[JBossWS] - WS does not understand my Client
by micho
Hello,
I try to call a webservice with the signatur:
public int addzwo(int a, int b, int c);
and get the following exception,
java.lang.NumberFormatException: For input string: ""
I tried it with a webservice that accepts strings as Parameters
@WebMethod
| public String concat(String a, String b)
| { return a+b; }
This works.
If I look at the SOAP Call I can see, that the int Parameters are coded as href and then referenced with a multiref Tag.
What do I have to tell the webservice (EJB3 style) that it unterstands this kind of int parameters.
SOAP call
| <soapenv:Envelope
| xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| mlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
| <soapenv:Body>
| <ns1:addzwo soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://server/jaws">
| <int_1 href="#id0"/>
| <int_2 href="#id1"/>
| <int_3 href="#id2"/>
| </ns1:addzwo>
|
| <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
| 4
| </multiRef>
| <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
| 8
| </multiRef>
| <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
| 2
| </multiRef></soapenv:Body></soapenv:Envelope>
WSDL
?
| <definitions name="SessionTestBeanService" targetNamespace="http://server/jaws">
| <types/>
| ?
| <message name="SessionTestBean_getZaehlerResponse">
| <part name="result" type="xsd:int"/>
| </message>
| ?
| <message name="SessionTestBean_addzwo">
| <part name="int_1" type="xsd:int"/>
| <part name="int_2" type="xsd:int"/>
| <part name="int_3" type="xsd:int"/>
| </message>
| ?
| <message name="SessionTestBean_add">
| <part name="int_1" type="xsd:int"/>
| <part name="int_2" type="xsd:int"/>
| </message>
| <message name="SessionTestBean_getZaehler"/>
| ?
| <message name="SessionTestBean_addzwoResponse">
| <part name="result" type="xsd:int"/>
| </message>
| ?
| <message name="SessionTestBean_addResponse">
| <part name="result" type="xsd:int"/>
| </message>
| ?
| <portType name="SessionTestBean">
| ?
| <operation name="add" parameterOrder="int_1 int_2">
| <input message="tns:SessionTestBean_add"/>
| <output message="tns:SessionTestBean_addResponse"/>
| </operation>
| ?
| <operation name="addzwo" parameterOrder="int_1 int_2 int_3">
| <input message="tns:SessionTestBean_addzwo"/>
| <output message="tns:SessionTestBean_addzwoResponse"/>
| </operation>
| ?
| <operation name="getZaehler">
| <input message="tns:SessionTestBean_getZaehler"/>
| <output message="tns:SessionTestBean_getZaehlerResponse"/>
| </operation>
| </portType>
| ?
| <binding name="SessionTestBeanBinding" type="tns:SessionTestBean">
| <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
| ?
| <operation name="add">
| <soap:operation soapAction=""/>
| ?
| <input>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </input>
| ?
| <output>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </output>
| </operation>
| ?
| <operation name="addzwo">
| <soap:operation soapAction=""/>
| ?
| <input>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </input>
| ?
| <output>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </output>
| </operation>
| ?
| <operation name="getZaehler">
| <soap:operation soapAction=""/>
| ?
| <input>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </input>
| ?
| <output>
| <soap:body namespace="http://server/jaws" use="literal"/>
| </output>
| </operation>
| </binding>
| ?
| <service name="SessionTestBeanService">
| ?
| <port binding="tns:SessionTestBeanBinding" name="SessionTestBeanPort">
| <soap:address location="http://nbmicho:8080/beans/SessionTestBean"/>
| </port>
| </service>
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985794#3985794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985794
18 years, 1 month
[JBossWS] - Re: Exception while deploying a webservice with attachment (
by mnsharif
People post their problems here when they run short of ideas on their own and they expect others to help. Anyway, thanks for all the help that was provided (my issue is still unresolved though).
RomeuFigueira!
As you mentioned about the files required for dealing with attachments in JBoss WS, i have created them all (but havent tweaked any of them manually).
It looks like that http://jira.jboss.com/jira/browse/JBWS-269 suggest that wstools (the tool from JBoss) does not currently support attachments. In either case, i am using wscompile (from JWSDPv1.6) to generate SEI and mapping file from a hand-written WSDL file. Then i write a web.xml and webservices.xml file by hand as well to complete the deployment package.
So, technically i have everything in place and i used same WSDL file to generate artifacts and published web service successfully on tomcat using JWSDP.
To frustrate me enough, the error that i get is
org.jboss.ws.WSException:
| Cannot obtain java/xml type mapping for: {http://www.w3.org/2001/XMLSchema}string
where we all know that the given schema DOES contain a data type with the name string
So, what's wrong with my implementation? any clues? anyone?
mnsharif
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985784#3985784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985784
18 years, 1 month
[JBossWS] - base64Binary: jbossws client serialize problem
by vbatista
Hello!
I am using JBoss 4.0.4 with jbossws 1.0.3GA. I am developing a WS DII client which talks with a third party Web Service. I am having problems serializing one field which is specified as "base64Binary" on the WSDL:
<xsd:complexType name="BinaryData">
<xsd:sequence>
<xsd:element name="data" type="xsd:base64Binary"
nillable="true"/>
<xsd:element name="mimeType" type="xsd:string"
nillable="true"/>
<xsd:element name="URL" type="xsd:string" nillable="true"/>
<xsd:element name="removeOnUpdate" type="xsd:boolean"
nillable="false"/>
</xsd:sequence>
The "data" field should be sent as a Base64 String. Although, the Request SOAP message has the following data:
<ns1:data xmlns:ns1="urn:drm/ingest-ex/IngestService/SchemaTypes">
<ns1:data>-1</ns1:data>
<ns1:data>-40</ns1:data>
<ns1:data>-1</ns1:data>
<ns1:data>-32</ns1:data>
......
<ns1:mimeType>image/jpeg</ns1:mimeType>
<ns1:URL xsi:nil="1"/>
<ns1:removeOnUpdate>false</ns1:removeOnUpdate>
</ns1:data>
I have implemented a client using jboss.net (org.jboss.axis...) and I have the same problem.
I have implemented a standalone client using axis (org.apache.axis...) and I can call the Web Service correctly. The Request SOAP message contains:
< data>
< data>j/4AAQSkZ.....
< mimeType>image/gif
< URL xsi:nil="true"/>
< removeOnUpdate>false
< /data>
In this case, the "data" field is correctly encoded as a Base64 String.
Am i missing any configuration with jbossws? What must I do to have the correct behavior?
Any help would really be appreciated.
Thanks in advance,
Victor Batista
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985777#3985777
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985777
18 years, 1 month
[JBossWS] - Encryption and Signature from .Net client
by kristof.taveirne
Hi,
I'm in urgent need of some help.
I'm having the biggest problems in the world creating just a simple HelloWorld webservice.
I've seen every possible exception and I've tried every possible configuration. The only conclusion I can take at the moment is that ws-security in JBoss is completely not interoperable with .Net clients using WSE 3.0.
I'm afraid that I don't get this fixed I'm gonna have to transfer our complete system to another application server or throw the complete ws-security stack of jboss overboard and implement the security handler myself from scratch tailored to what the .Net client is sending out.
What I'm trying to do is realy simple
I'm looking for a way to do ws-encryption of the data being transfered and have somekind of authentication on the server.
I need to know who send me the data, and I want it encrypted over the wire.
I'm not gonna post here all the things I've tried over the last few weeks because this mail would be way to long.
My question is simple: Has anyone on this globe ever done this before? And how did he do it?
Thanks alot!
Kristof.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985567#3985567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985567
18 years, 1 month