Use the convert class of Apache Woden to convert wsdl1.1 to wsdl2.0

Source: Internet
Author: User

I encountered a problem when converting wsdl1.1 to wsdl2.0 using the convert class of Apache Woden. When wsdl1.1 contains extension elements, such as <plnk: partnerlinktype>, the program throws an exception. If such an element is not included, it can be converted normally.
The following are the wsdl1.1 files used:
<? XML version = "1.0" encoding = "UTF-8"?>
<WSDL: Definitions name = "loanprocess"
Xmlns: TNS = "http://www.example.org/loanProcess"
Targetnamespace = "http://www.example.org/loanProcess"
Xmlns: XSD = "http://www.w3.org/2001/XMLSchema"
Xmlns: Soap = "http://schemas.xmlsoap.org/wsdl/soap"
Xmlns: WSDL = "http://schemas.xmlsoap.org/wsdl"
Xmlns: plnk = "http://docs.oasis-open.org/wsbpel/2.0/plnktype"
Xmlns: Loan = "http://schemas.sia.org/sample/LoanRequest/2008/02/loanRequest.xsd"
Xmlns: loanmsg = "http://docs.sia.org/sample/wsdl/loanMessages/2008/02/loanMessages.wsdl">

<Plnk: partnerlinktype name = "loanprocesslt">
<Plnk: role name = "loanprocessor" porttype = "TNS: loanprocess"/>
</Plnk: partnerlinktype>
<WSDL: Import location = "loanmessages. WSDL" namespace = "http://docs.sia.org/sample/wsdl/loanMessages/2008/02/loanMessages.wsdl"/>

<WSDL: types>
<XSD: schema elementformdefault = "qualified">
<XSD: Import
Namespace = "http://schemas.sia.org/sample/LoanRequest/2008/02/loanRequest.xsd"
Schemalocation = ".../Schema/loanrequest. XSD">
</XSD: Import>
</XSD: schema>
</WSDL: types>

<WSDL: porttype name = "loanprocess">
<WSDL: Operation name = "request">
<WSDL: input message = "loanmsg: creditinformationmessage"/>
<WSDL: Output Message = "loanmsg: approvalmessage"/>
<WSDL: fault name = "unabletohandlerequest" message = "loanmsg: errormessage"/>
</WSDL: Operation>
</WSDL: porttype>

.......
</WSDL: Definitions>

When the convertfile () method of the convert class is called: "Convert. convertfile (null, filepath,". ", true, true);", an exception is thrown:
Java. Lang. illegalargumentexception: encountered unknown extension element '{HTTP
: // Docs.oasis-open.org/wsbpel/2.0/plnktype?partnerlinktype', as a child of a Jav
Ax. WSDL. Definition.
At org. Apache. Woden. tool. converter. Convert. convertextensions (convert. Java: 456)
At org. Apache. Woden. tool. converter. Convert. convertdefinition (convert. Java: 224)
At org. Apache. Woden. tool. converter. Convert. convertdefinition (convert. Java: 187)
At org. Apache. Woden. tool. converter. Convert. convertfile (convert. Java: 284)
At org. Apache. Woden. tool. converter. testconvert. testconvertfile (testconvert. Java
: 79 ).
Please refer to all the experts in this article for instructions. What is the problem? How can this problem be solved? Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.