Question

I have to request a PHP page with 3 Parameters (e.g. www.test.com/index.php?name=mrTest&no=1&id=10001). I'm using WSDL2JAVA for other Services and am now wondering if it is possible to generate a similar Service for this case. This PHP page Returns an XML. I'm just consumer/client of the Service.

I could also make a simple request and then use JAXB to parse the XML but i would like to implement all my Services the same way.

So, does anybody has already implement a php page consumer using WSDL2JAVA?

Best regards

Was it helpful?

Solution

So from my understanding this is a simple PHP page not a SOAP service. Remember XML is just the protocol used in a SOAP service however a SOAP service consists out of a WSDL that is published describing operations and how to call those operations.

A simple PHP page even if it returns XML data is NOT a SOAP service and thus does NOT have a WSDL. You wont be able to use WSDL2JAVA for that.

This PHP page seems more like a REST type service that returns XML instead of JSON. To be honest it really sounds like a REST service.

Try using the latest SOAPUI to connect to the page and see if you can use the REST project type with this page. If it is a REST service it might have a WADL file. YOu can use the WADL2JAVA cxf utility to generate classes to you. HOwever this is a BIG might as most REST services dont use WADL's yet. See this link on CXF

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top