[JBossWS] - Re: JBoss 4.0.x migration to 4.2.x
by dlgrasse
Thanks for the idea. I removed the existing jbossws.sar dir in JBoss4.2.1, and installed JBoss2.0.0GA via the ant script, but got the same results.
Troubleshooting this as if it were strictly an XML validation issue, I was able to remove the error mentioned in the first post. A second issue persisted though (org.jboss.ws.WSException: Cannot obtain java type mapping for {some wsdl schema type}). I was hoping it was caused by the schema error, but unfortunately it wasn't.
Working through this problem I was able to resolve it by changing the contents of the jaxrpc-mapping file. Originally the java-xml-type-mapping's were mapping the wsdl element names to Java types. I had to change them to the schema types to get it to work. Here's an example of what I did:
jaxrpc-mapping.xml
| <java-xml-type-mapping>
| <java-type>{mapped Java type}</java-type>
|
| <!--root-type-qname>impl:getReflistsRequest</root-type-qname>
| <qname-scope>element</qname-scope-->
|
| <root-type-qname>tns1:ReflistsInput</root-type-qname>
| <qname-scope>complexType</qname-scope>
| </java-xml-type-mapping>
|
In my wsdl file is the following in the wsdl:types section:
| <wsdl:types>
| <schema xmlns='http://www.w3.org/2001/XMLSchema'
| targetNamespace='{impl namespace}'
| elementFormDefault='qualified'
| >
| <import namespace='{tns1 namespace}' schemaLocation='{schema file}'/>
|
| <element name='getReflistsRequest' type='tns1:ReflistsInput'/>
| </schema>
| </wsdl:types>
|
Where I originally had the mapping to the wsdl element name, I had to change it to point to the underlying schema-defined XML type.
Is this the expected behavior - a change from the earlier JBossWS implementation? Or is there a way to point to the wsdl names by namespace resolution?
dlgrasse
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071254#4071254
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071254
17 years, 4 months
[JBossWS] - problems using wsconsume
by pillcase
Dear all,
I'm newbie to the JBoss WS, I want to develop a ws client using a wsdl file, when I tried to use the wsconsume, exceptions occured.
This is the wsdl file:
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xsd="http://loginservice.poc.com/types" xmlns:ns="http://loginservice.poc.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://loginservice.poc.com"><wsdl:documentation>LoginService</wsdl:documentation><wsdl:types><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://loginservice.poc.com/types">
<xs:element name="checking">
<xs:complexType>
<xs:sequence>
<xs:element name="userName" nillable="true" type="xs:string" />
<xs:element name="password" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="checkingResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></wsdl:types><wsdl:message name="checkingMessage"><wsdl:part name="part1" element="xsd:checking" /></wsdl:message><wsdl:message name="checkingResponseMessage"><wsdl:part name="part1" element="xsd:checkingResponse" /></wsdl:message><wsdl:portType name="LoginServicePortType"><wsdl:operation name="checking"><wsdl:input message="ns:checkingMessage" wsaw:Action="urn:checking" /><wsdl:output message="ns:checkingResponseMessage" wsaw:Action="urn:checking" /></wsdl:operation></wsdl:portType><wsdl:binding name="LoginServiceSOAP11Binding" type="ns:LoginServicePortType"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="checking"><soap:operation soapAction="urn:checking" style="document" /><wsdl:input><soap:body use="literal" /></wsdl:input><wsdl:output><soap:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="LoginServiceSOAP12Binding" type="ns:LoginServicePortType"><soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /><wsdl:operation name="checking"><soap12:operation soapAction="urn:checking" style="document" /><wsdl:input><soap12:body use="literal" /></wsdl:input><wsdl:output><soap12:body use="literal" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="LoginServiceHttpBinding" type="ns:LoginServicePortType"><http:binding verb="POST" /><wsdl:operation name="checking"><http:operation location="checking" /><wsdl:input><mime:content type="text/xml" /></wsdl:input><wsdl:output><mime:content type="text/xml" /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="LoginService"><wsdl:port name="LoginServiceSOAP11port_http" binding="ns:LoginServiceSOAP11Binding"><soap:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port><wsdl:port name="LoginServiceSOAP12port_http" binding="ns:LoginServiceSOAP12Binding"><soap12:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port><wsdl:port name="LoginServiceHttpport" binding="ns:LoginServiceHttpBinding"><http:address location="http://192.168.1.153:8080/axis2/services/LoginService" /></wsdl:port></wsdl:service></wsdl:definitions>
This is the exceptions:
Failed to invoke WsImport
javax.xml.stream.FactoryConfigurationError: Provider com.ctc.wstx.stax.WstxInput
Factory not found
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:120)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136
)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.(XMLStrea
mReaderFactory.java:36)
at com.sun.xml.ws.api.addressing.WSEndpointReference.(WSEndpointRe
ference.java:130)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVers
ion.java:422)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVers
ion.java:53)
at com.sun.xml.ws.api.addressing.AddressingVersion$1.(AddressingVe
rsion.java:132)
at com.sun.xml.ws.api.addressing.AddressingVersion.(AddressingVe
rsion.java:55)
at com.sun.tools.ws.wsdl.parser.MemberSubmissionAddressingExtensionHandl
er.getNamespaceURI(MemberSubmissionAddressingExtensionHandler.java:52)
at com.sun.tools.ws.wsdl.parser.WSDLParser.register(WSDLParser.java:116)
at com.sun.tools.ws.wsdl.parser.WSDLParser.(WSDLParser.java:106)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLMo
deler.java:95)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:148)
at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumer
Impl.java:187)
at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:2
16)
at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:79)
Does anyone knows how to solve this problem?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071102#4071102
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071102
17 years, 4 months