[jboss-user] [JBossWS] - Re: Binding exception - prefix
alesj
do-not-reply at jboss.com
Fri Nov 3 10:14:19 EST 2006
This is my wsdl
| <wsdl:definitions name="SimpleServiceImpl" targetNamespace="http://www.themindelectric.com/wsdl/SimpleServiceImpl/">
|
| <wsdl:types>
|
| <xsd:schema targetNamespace="http://www.themindelectric.com/package/com.generalynx.common.interfaces/">
|
| <xsd:complexType name="SimpleOutData">
|
| <xsd:all>
| <xsd:element name="response" nillable="true" type="xsd:string"/>
| </xsd:all>
| </xsd:complexType>
|
| <xsd:complexType name="SimpleInData">
|
| <xsd:all>
| <xsd:element name="date" type="xsd:dateTime"/>
| </xsd:all>
| </xsd:complexType>
| </xsd:schema>
|
| <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.themindelectric.com/wsdl/SimpleServiceImpl/">
| <xsd:import namespace="http://www.themindelectric.com/package/com.generalynx.common.interfaces/"/>
|
| <xsd:element name="getHelloWorld">
|
| <xsd:complexType>
|
| <xsd:sequence>
| <xsd:element name="inData" type="n11:SimpleInData"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
|
| <xsd:element name="getHelloWorldResponse">
|
| <xsd:complexType>
|
| <xsd:sequence>
| <xsd:element name="Result" type="n11:SimpleOutData"/>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:element>
| </xsd:schema>
| </wsdl:types>
|
| <wsdl:message name="getHelloWorld0In">
| <wsdl:part name="parameters" element="tns:getHelloWorld"/>
| </wsdl:message>
|
| <wsdl:message name="getHelloWorld0Out">
| <wsdl:part name="parameters" element="tns:getHelloWorldResponse"/>
| </wsdl:message>
|
| <wsdl:portType name="SimpleService">
|
| <wsdl:operation name="getHelloWorld" parameterOrder="inData">
| <wsdl:input name="getHelloWorld0In" message="tns:getHelloWorld0In"/>
| <wsdl:output name="getHelloWorld0Out" message="tns:getHelloWorld0Out"/>
| </wsdl:operation>
| </wsdl:portType>
|
| <wsdl:binding name="SimpleService" type="tns:SimpleService">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
| <wsdl:operation name="getHelloWorld">
| <soap:operation soapAction="getHelloWorld" style="document"/>
|
| <wsdl:input name="getHelloWorld0In">
| <soap:body use="literal"/>
| </wsdl:input>
|
| <wsdl:output name="getHelloWorld0Out">
| <soap:body use="literal"/>
| </wsdl:output>
| </wsdl:operation>
| </wsdl:binding>
|
| <wsdl:service name="SimpleServiceImpl">
|
| <wsdl:documentation>
| instance of class com.generalynx.gema.services.impl.SimpleServiceImpl
| </wsdl:documentation>
|
| <wsdl:port name="SimpleService" binding="tns:SimpleService">
| <soap:address location="http://sokolov:8081/gema/services/SimpleService"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
And my ws client definition looks like this:
| @WebServiceClient(
| name = "SimpleServiceImpl",
| targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/",
| wsdlLocation = "http://sokolov:8081/gema/services/SimpleService.wsdl"
| )
| public class SimpleServiceImpl extends javax.xml.ws.Service {
|
| public SimpleServiceImpl() throws MalformedURLException {
| this(
| new URL("http://sokolov:8081/gema/services/SimpleService.wsdl"),
| new QName("http://www.themindelectric.com/wsdl/SimpleServiceImpl/", "SimpleServiceImpl")
| );
| }
|
| public SimpleServiceImpl(URL url, QName qName) {
| super(url, qName);
| }
|
| @WebEndpoint(name = "SimplePort")
| public SimpleService getSimplePort() {
| return (SimpleService) super.getPort(
| new QName("http://www.themindelectric.com/wsdl/SimpleServiceImpl/", "SimpleService"),
| SimpleService.class);
| }
|
| }
|
|
| @WebService
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| public interface SimpleService {
|
| @WebMethod
| @WebResult(name = "getHelloWorldResponse", targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/")
| SimpleOutData getHelloWorld(
| @WebParam(name = "getHelloWorld", targetNamespace = "http://www.themindelectric.com/wsdl/SimpleServiceImpl/")
| SimpleInData data
| );
|
| }
|
Is this a valid client invocation / request?
| Outgoing SOAPMessage
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
| <env:Header/>
| <env:Body>
| <ns1:getHelloWorld xmlns:ns1='http://www.themindelectric.com/wsdl/SimpleServiceImpl/'>
| <date>2006-11-03T16:04:00.015+01:00</date>
| </ns1:getHelloWorld>
| </env:Body>
| </env:Envelope>
|
I get this response, but I get a null result object.
| @SuppressWarnings({"EJB_ERROR"})
| public class ClientTesterJob implements Job {
|
| @WebServiceRef(SimpleServiceImpl.class)
| private SimpleService simpleService;
|
| public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
| System.out.println(simpleService != null);
| SimpleInData data = new SimpleInData();
| data.setDate(new Date());
| System.out.println(simpleService.getHelloWorld(data));
| }
|
| }
|
|
| Incoming Response SOAPMessage
| <soap:Envelope xmlns:n3='http://www.themindelectric.com/package/com.generalynx.common.interfaces/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <soap:Header/>
| <soap:Body>
| <n:getHelloWorldResponse xmlns:n='http://www.themindelectric.com/wsdl/SimpleServiceImpl/'>
| <n:Result xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='n3:SimpleOutData'>
| <response xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='xsd:string'>Hello world null</response>
| </n:Result>
| </n:getHelloWorldResponse>
| </soap:Body>
| </soap:Envelope>
I also get a null parameter object on the service side.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982996#3982996
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982996
More information about the jboss-user
mailing list