aspose file tools*
The moose likes Web Services and the fly likes Proprietary XML to WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Proprietary XML to WSDL" Watch "Proprietary XML to WSDL" New topic
Author

Proprietary XML to WSDL

LarryKeepTrying
Greenhorn

Joined: Mar 27, 2006
Posts: 1
Hi, I'd like to scope out the effort to take our proprietary XML web service to be a WSDL compliant web service. We currently exchange XML documents with our customers via a Servlet. The current submit documents have authentication information, as well as the content of the request being submitted. Some of the documents are fairly complex (but all are currently defined with DTDs). We use JAXB to go XML-to-Java and Java-to-XML.

I understand that the documents will change, but is there a way to 'wrap' the existing documents within the constructs of a WSDL document? Ideally, I'd like the web service to take as input an XML document representing our existing documents and output our existing document wrapped within a SOAP/WSDL structure.

Is this possible? I can't see making each piece of data in our current submit documents a separate parameter. And how are our complex response documents returned to the caller?

Sorry for all the questions, but all the usual 'Calculator' examples leave me asking more questions.

Thanks for any input, tips, and advice!
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Please change your publicly displayed name to satisfy the JavaRanch naming policy.

Originally posted by LarryKeepTrying:
Sorry for all the questions, but all the usual 'Calculator' examples leave me asking more questions.


The "Calculator" examples are more targeted toward the RPC crowd. You seem to require a SOAP Web service in the document/literal mode.

Originally posted by LarryKeepTrying:
I can't see making each piece of data in our current submit documents a separate parameter. And how are our complex response documents returned to the caller?


Document-oriented Web services exchange XML-documents, not RPC parameters and return values wrapped in XML. Document-oriented Web services don't support WSDL operations - either the document type determines the operation or the endpoint (as part of the interaction layer) may inspect the content of the document before it decides how to dispatch the document to the business logic (the processing layer).

For more details please see:
Which style of WSDL should I use?
Patterns and Strategies for Building Document-Based Web Services.

Originally posted by LarryKeepTrying:
I'd like the web service to take as input an XML document representing our existing documents and output our existing document wrapped within a SOAP/WSDL structure
.

As you are already using JAXB it's likely that you have XML-Schemas for all your XML-documents. Using those documents in a WSDL (and the resulting SOAP) should be just a matter of importing the XML Schemas into the WSDL "types" section.

Originally posted by LarryKeepTrying:
The current submit documents have authentication information, as well as the content of the request being submitted.
.

During the initial phase you'll probably leave the authentication information in the XML document - but you will probably want to move the authentication information into the SOAP header according to a specification like WS-Security.
 
Consider Paul's rocket mass heater.
 
subject: Proprietary XML to WSDL