Will this web service accept both raw xml and an object?

Posted by ChadNC on Stack Overflow See other posts from Stack Overflow or by ChadNC
Published on 2010-04-06T22:33:40Z Indexed on 2010/04/06 22:53 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

We have a web service that provides auto insurance quotes and a company that provides an insurance agency management system would like to use the web service for thier client but they want to pass the web service raw xml instead of using the wsdl to create a port, the object the service expects and calling the web method.

The web service has performed flawlessly by creating an object like so

    com.insurance.quotesvc.AgencyQuote service = new com.insurance.quotesvc.AgencyQuote();
com.insurance.quotesvc.QuotePortType port = service.getQuotePortType();
com.insurance.quotesvc.schemas.request.ACORD parameter = null;

Then create initialize the request object with the other objects that make up the response.

  parameter = factory.createACORD();
  parameter.setSignonRq(signOn);
  parameter.setInsurancesSvcRq(svcRq);

And send the request to the web service.

  com.insurance.quotesvc.schemas.response.ACORD result = null;
  result = port.requestQuote(parameter);

By doing that I am able to easily marshall the request and the result into an xml file and do with them as I wish. So if a client was to send the web service via an http post as raw xml inside of a soap envelope. Would the web service be able to handle the xml without any changes being made to the web service or would there need to be changes made to the web service in order for it to handle a request of that type?

The web service is a JAX_WS and we currently have both Java and C# clients consuming the web service using the method described above but now there is another client who wants to send raw xml inside of a soap envelope instead of creating the objects. I feel pretty sure that they will be making the call to the web service using vb.

I'm sure I'm missing something obvious but it is eluding me at the moment and any help is greatly appreciated.

© Stack Overflow or respective owner

Related posts about web-services

Related posts about java