Hiya,
This does seem to be some kind of issue with the dynamic client not regonizing the foo operation correctly. Can you file a jira again?

BTW, I was talking with Sam Pullara on IRC yesterday and he had a good suggestion. It'd be really cool to hand the schemas to JAXB to compile on the fly, then use the JAXB objects. So that way if there is some complex type then we could do things like this without having the files around:

book = new Book();
book.name = "XFire for dummies"

bookClient.addBook(book);

- Dan
tog wrote:

Dan

Yes groovySOAP is based on the dynamic client so this is the one that is
used -)
So I don't have any WSDL but here is the conversations I catched through
tcpmon

1- Initialize the service - ask for wsdl

1.1 QUERY

GET /StringsService?wsdl HTTP/1.1
User-Agent: Java/1.5.0_06
Host: localhost:6969
Accept: text/html, image/gif, image/jpeg, *; q=3D.2, */*; q=3D.2
Connection: keep-alive
Content-type: application/x-www-form-urlencoded

1.2 RESPONSE

HTTP/1.1 200 OK
Date: Thu, 04 May 2006 19:34:44 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_06
Content-Type: text/xml
Transfer-Encoding: chunked

95c
<?xml version=3D" 1.0" encoding=3D"UTF-8"?>
<wsdl:definitions xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/";
xmlns:soap11=3D" http://schemas.xmlsoap.org/soap/envelope/"; xmlns:soap12=3D"
http://www.w3.org/2003/05/soap-envelope"; xmlns:soapenc11=3D"
http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soapenc12=3D"
http://www.w3.org/2003/05/soap-encoding"; xmlns:tns=3D" http://DefaultNamespa=
ce"
xmlns:wsdlsoap=3D"http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; targetNamespace=3D"http://DefaultNamespac=
e">
  <wsdl:types>
    <xsd:schema targetNamespace=3D" http://DefaultNamespace";
elementFormDefault=3D"qualified" attributeFormDefault=3D"qualified">
      <xsd:element name=3D"foo">
        <xsd:complexType>
          <xsd:sequence>
<xsd:element name=3D"in0" type=3D"xsd:string" nillable=3D"true"
minOccurs=3D"1" maxOccurs=3D"1" />
<xsd:element name=3D"in1" type=3D"xsd:string" nillable=3D"true"
minOccurs=3D"1" maxOccurs=3D"1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name=3D"fooResponse">
        <xsd:complexType />
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name=3D"fooResponse">
    <wsdl:part element=3D"tns:fooResponse" name=3D"parameters" />
  </wsdl:message>
  <wsdl:message name=3D"fooRequest">
    <wsdl:part element=3D"tns:foo" name=3D"parameters" />
  </wsdl:message>
  <wsdl:portType name=3D"StringsServicePortType">
    <wsdl:operation name=3D"foo">
      <wsdl:input message=3D"tns:fooRequest" name=3D"fooRequest" />
      <wsdl:output message=3D"tns:fooResponse" name=3D"fooResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name=3D"StringsServiceHttpBinding"
type=3D"tns:StringsServicePortType">
    <wsdlsoap:binding style=3D"document" transport=3D"
http://schemas.xmlsoap.org/soap/http"; />
    <wsdl:operation name=3D"foo">
      <wsdlsoap:operation soapAction=3D"" />
      <wsdl:input name=3D"fooRequest">
        <wsdlsoap:body use=3D"literal" />
      </wsdl:input>
      <wsdl:output name=3D"fooResponse">
        <wsdlsoap:body use=3D"literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name=3D"StringsService">
    <wsdl:port binding=3D"tns:StringsServiceHttpBinding"
name=3D"StringsServiceHttpPort">
<wsdlsoap:address location=3D"http://localhost:6969/StringsService"; /=
>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


0

2- Query the foo service with 2 strings as parameters

2.1- QUERY

POST /StringsService HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=3DUTF-8
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; XFire Client
+http://xfire.codehaus.org)
Host: localhost:6969
Expect: 100-continue
Content-Length: 332

<?xml version=3D'1.0' encoding=3D'UTF-8'?><soap:Envelope xmlns:soap=3D"
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; xmlns:xsi=3D"
http://www.w3.org/2001/XMLSchema-instance";><soap:Body><foo xmlns=3D"
http://DefaultNamespace"; xsi:type=3D"xsd:string">this is the content
!</foo></soap:Body></soap:Envelope>

2.2 THE ERROR

HTTP/1.1 100 Continue

HTTP/1.1 500 Internal Server Error
Date: Thu, 04 May 2006 19:34:46 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_06
Content-Type: text/xml; charset=3DUTF-8
Transfer-Encoding: chunked

15d
<?xml version=3D'1.0' encoding=3D'UTF-8'?><soap:Envelope xmlns:soap=3D"
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; xmlns:xsi=3D"
http://www.w3.org/2001/XMLSchema-instance";><soap:Body><soap:Fault><faultcod=
e>soap:Server</faultcode><faultstring>Index:
0, Size: 0</faultstring></soap:Fault></soap:Body></soap:Envelope>
0

I call the client doing this:
Object[] response =3D client.invoke(name, objs);
and I have checked that name is "foo" and objs is an array of 2 elements.

It looks like the second argument is ignored. There was a JIRA  issue for
this a while ago but it is closed and I checked it is working on my sample
doing a sum of 2 integers...

Changing the interface in such a way that the method returns a STring works
nicely. Here is the conversation:

1-Cretae proxy using WSDL URL

GET /StringsService?wsdl HTTP/1.1
User-Agent: Java/1.5.0_06
Host: localhost:6969
Accept: text/html, image/gif, image/jpeg, *; q=3D.2, */*; q=3D.2
Connection: keep-alive
Content-type: application/x-www-form-urlencoded
-----
HTTP/1.1 200 OK
Date: Thu, 04 May 2006 20:02:00 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_06
Content-Type: text/xml
Transfer-Encoding: chunked

a3b
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<wsdl:definitions xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/";
xmlns:soap11=3D" http://schemas.xmlsoap.org/soap/envelope/"; xmlns:soap12=3D"
http://www.w3.org/2003/05/soap-envelope " xmlns:soapenc11=3D"
http://schemas.xmlsoap.org/soap/encoding/"; xmlns:soapenc12=3D"
http://www.w3.org/2003/05/soap-encoding <http://www.w3.org/2003/05/soap-encoding>" xmlns:tns=3D"http://DefaultNamespa=
ce"
xmlns:wsdlsoap=3D"http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; targetNamespace=3D"http://DefaultNamespac=
e">
  <wsdl:types>
    <xsd:schema targetNamespace=3D" http://DefaultNamespace";
elementFormDefault=3D"qualified" attributeFormDefault=3D"qualified">
      <xsd:element name=3D"concat">
        <xsd:complexType>
          <xsd:sequence>
<xsd:element name=3D"in0" type=3D"xsd:string" nillable=3D"true"
minOccurs=3D"1" maxOccurs=3D"1" />
<xsd:element name=3D"in1" type=3D"xsd:string" nillable=3D"true"
minOccurs=3D"1" maxOccurs=3D"1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name=3D"concatResponse">
        <xsd:complexType>
          <xsd:sequence>
<xsd:element name=3D"out" type=3D"xsd:string" nillable=3D"true"
minOccurs=3D"1" maxOccurs=3D"1" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name=3D"concatRequest">
    <wsdl:part element=3D"tns:concat" name=3D"parameters" />
  </wsdl:message>
  <wsdl:message name=3D"concatResponse">
    <wsdl:part element=3D"tns:concatResponse" name=3D"parameters" />
  </wsdl:message>
  <wsdl:portType name=3D"StringsServicePortType">
    <wsdl:operation name=3D"concat">
      <wsdl:input message=3D"tns:concatRequest" name=3D"concatRequest" />
<wsdl:output message=3D"tns:concatResponse" name=3D"concatResponse" /=
>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name=3D"StringsServiceHttpBinding"
type=3D"tns:StringsServicePortType">
    <wsdlsoap:binding style=3D"document" transport=3D"
http://schemas.xmlsoap.org/soap/http"; />
    <wsdl:operation name=3D"concat">
      <wsdlsoap:operation soapAction=3D"" />
      <wsdl:input name=3D"concatRequest">
        <wsdlsoap:body use=3D"literal" />
      </wsdl:input>
      <wsdl:output name=3D"concatResponse">
        <wsdlsoap:body use=3D"literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name=3D"StringsService">
    <wsdl:port binding=3D"tns:StringsServiceHttpBinding"
name=3D"StringsServiceHttpPort">
<wsdlsoap:address location=3D" http://localhost:6969/StringsService"; /=
>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


0


2- Call concat (String concat(String s1, String s2)

POST /StringsService HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=3DUTF-8
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; XFire Client
+http://xfire.codehaus.org)
Host: localhost:6969
Expect: 100-continue
Content-Length: 373

<?xml version=3D'1.0' encoding=3D'UTF-8'?><soap:Envelope xmlns:soap=3D"
http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/>" xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; xmlns:xsi=3D"
http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>"><soap:Body><concat xmlns=3D"
http://DefaultNamespace";><in0
xmlns=3D"http://DefaultNamespace";>Guillaume_</in0><in1>Alleon
aka tog</in1></concat></soap:Body></soap:Envelope>
-----
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Thu, 04 May 2006 20:02:02 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_06
Content-Type: text/xml; charset=3DUTF-8
Transfer-Encoding: chunked

17a
<?xml version=3D'1.0' encoding=3D'UTF-8'?><soap:Envelope xmlns:soap=3D"
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd=3D"
http://www.w3.org/2001/XMLSchema"; xmlns:xsi=3D"
http://www.w3.org/2001/XMLSchema-instance";><soap:Body><concatResponse
xmlns=3D"http://DefaultNamespace";><out
xmlns=3D" http://DefaultNamespace";>Guillaume_Alleon
aka tog</out></concatResponse></soap:Body></soap:Envelope>
0

So this has really to do with the dynamic client.

cheers
tog


On 5/4/06, Dan Diephouse <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
> I think your client might be sending a different message than your
> server is expecting for some reason. I fixed that error message a day or
> two ago to make it more clear. Is this using the dynamic client? Could
> you maybe attach the wsdl and service configuration code for your
> service? Also if you have a chance to look at the incoming message using
> TcpMon that would help too.
>
> - Dan
>



--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to