Trying up upgrade our procedure of generating jar file from wsdl. We were using AXIS2 and would like to start using CXF with then upgrading of Java on our system.
Using the command line: Caused by {}[message:integer] not exist. The wsdl contains:
<portType name='getNextLinkTranxNumPortType'>
<operation name='getNextLinkTranxNum'>
<input message='tns:getNextLinkTranxNum'/>
<output message='tns:integer'/>
<fault name='exception' message='tns:exception'/>
</operation>
</portType>
So I tried to create a bindings.xml file to define integer:
<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns=";
xmlns:wsdl="/"
xmlns:soap="/"
xmlns:xsd=";
wsdlLocation=".wsdl">
<!-- Example: Modify SOAP Binding -->
<wsdl:binding name="MyServiceSoapBinding">
<soap:binding style="document" transport=";/>
</wsdl:binding>
<jxb:bindings version="2.1" xmlns:jxb=";
xmlns:xs=";>
<jxb:bindings schemaLocation=".xsd">
<jxb:bindings node="//xs:element[@name='integer']">
<jxb:javaType name="java.lang.Integer"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
</bindings>
Using the following command line: wsdl2java -verbose -keep -d c:\users\snelliga\dev2.jar -p com.example.generated -xjc -exsh true -b bindings.xml .wsdl
Now I'm getting the error:WSDLToJava Error: Not a valid jaxb or jaxws binding file, please check the namespace
How can I fix this?
Thanks in advance, -Steve Nelligan
researching on web and with ChatCPT
Need to create java pojo from wsdl
Trying up upgrade our procedure of generating jar file from wsdl. We were using AXIS2 and would like to start using CXF with then upgrading of Java on our system.
Using the command line: Caused by {http://maximus/assetworks/fmax-wsdl}[message:integer] not exist. The wsdl contains:
<portType name='getNextLinkTranxNumPortType'>
<operation name='getNextLinkTranxNum'>
<input message='tns:getNextLinkTranxNum'/>
<output message='tns:integer'/>
<fault name='exception' message='tns:exception'/>
</operation>
</portType>
So I tried to create a bindings.xml file to define integer:
<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://apache./cxf/wsdl/extensions/binding"
xmlns:wsdl="http://schemas.xmlsoap./wsdl/"
xmlns:soap="http://schemas.xmlsoap./wsdl/soap/"
xmlns:xsd="http://www.w3./2001/XMLSchema"
wsdlLocation="https://aimDEV2.fs.illinois.edu/fmax/wsdl/fmax-wsdl.wsdl">
<!-- Example: Modify SOAP Binding -->
<wsdl:binding name="MyServiceSoapBinding">
<soap:binding style="document" transport="http://schemas.xmlsoap./soap/http"/>
</wsdl:binding>
<jxb:bindings version="2.1" xmlns:jxb="http://java.sun/xml/ns/jaxb"
xmlns:xs="http://www.w3./2001/XMLSchema">
<jxb:bindings schemaLocation="https://aimDEV2.fs.illinois.edu/fmax/wsdl/fmax-web-services.xsd">
<jxb:bindings node="//xs:element[@name='integer']">
<jxb:javaType name="java.lang.Integer"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
</bindings>
Using the following command line: wsdl2java -verbose -keep -d c:\users\snelliga\dev2.jar -p com.example.generated -xjc -exsh true -b bindings.xml https://aimDEV2.fs.illinois.edu/fmax/wsdl/fmax-wsdl.wsdl
Now I'm getting the error:WSDLToJava Error: Not a valid jaxb or jaxws binding file, please check the namespace
How can I fix this?
Thanks in advance, -Steve Nelligan
researching on web and with ChatCPT
Need to create java pojo from wsdl
Share Improve this question asked Mar 6 at 22:16 SteveSteve 215 bronze badges1 Answer
Reset to default 0You appear to have the wrong namespace for the binding file.
See https://cxf.apache./docs/wsdl-to-java.html.
Assuming CXF 4.0:
<bindings
xmlns:xsd="http://www.w3./2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap./wsdl/"
wsdlLocation="hello_world.wsdl"
xmlns="https://jakarta.ee/xml/ns/jaxws">
<bindings node="wsdl:definitions/wsdl:portType[@name='GreeterSE']">
<class name="GreeterSEI"/>
</bindings>
</bindings>