You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Juan Alvarez <ja...@gmail.com> on 2006/06/19 18:18:18 UTC
See SOAP message more readable.
Hello all. I have a problem with the manner the axis generation of a SOAP
message.
I need to 'see' the message without multiRef or href tags but AXIS
automatically generates that tags when I get it by means of method
getSOAPPartAsString() of Message class .
¿Is there any manner to get the SOAP message but without that tags?
Here is a piece of my SOAP message tha bring me AXIS :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:processTkt soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="
impl.wsresiber.emision.iberia.com">
<in0 href="#id0" />
</ns1:processTkt>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TktInfo"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="
http://ints.wsresiber.emision.iberia.com">
<loc_r xsi:type="xsd:string">TT22A</loc_r>
<loc_a xsi:type="xsd:string">AFX002</loc_a>
<e_r xsi:type="xsd:string">endorsement restriction value</e_r>
<name xsi:type="xsd:string">Jose Luis Moreno</name>
<num_pax xsi:type="xsd:int">2</num_pax>
<fp xsi:type="xsd:string">With VISA card.</fp>
<b_fare href="#id1" />
<eqv xsi:type="soapenc:double">232.222</eqv>
<br xsi:type="soapenc:double">111.22</br>
<taxes xsi:type="soapenc:Array" soapenc:arrayType="ns2:Tax[3]">
<item href="#id2" />
<item href="#id3" />
<item href="#id4" />
</taxes>
<total href="#id5" />
<tkts xsi:type="soapenc:Array" soapenc:arrayType="ns2:Tkt[2]">
<item href="#id6" />
<item href="#id7" />
</tkts>
<foids xsi:type="soapenc:Array" soapenc:arrayType="ns2:Foid[3]">
<item href="#id8" />
<item href="#id9" />
<item href="#id10" />
</foids>
<tkt_date xsi:type="xsd:string">23OCT06</tkt_date>
<tkt_1a href="#id11" />
<bkg_1a href="#id12" />
<ch xsi:type="soapenc:int">32</ch>
<sf href="#id13" />
<gran_tot href="#id14" />
</multiRef>
<multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Tkt" xmlns:ns3="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<tkt_nr xsi:type="xsd:string">1</tkt_nr>
<f_calc xsi:type="xsd:string">Fare calc value</f_calc>
<coupons xsi:type="soapenc:Array"
soapenc:arrayType="ns3:Coupon[4]">
<item href="#id15" />
<item href="#id16" />
<item href="#id17" />
<item href="#id18" />
</coupons>
</multiRef>
<multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Tkt" xmlns:ns4="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<tkt_nr xsi:type="xsd:string">2</tkt_nr>
<f_calc xsi:type="xsd:string">Fare calc value</f_calc>
<coupons xsi:type="soapenc:Array"
soapenc:arrayType="ns4:Coupon[2]">
<item href="#id19" />
<item href="#id20" />
</coupons>
</multiRef>
<multiRef id="id11" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:Info" xmlns:ns5="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<offc xsi:type="xsd:string">OFFCEMISIONOFFC</offc>
<iata xsi:type="xsd:string">IATAEMIISONIATA</iata>
</multiRef>
<multiRef id="id9" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:Foid" xmlns:ns6="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<foid xsi:type="xsd:string">FOIDAACAAABAABAFOID</foid>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:Tax" xmlns:ns7="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<amt xsi:type="xsd:string">10.221</amt>
<tipoTasa xsi:type="xsd:string">1ab</tipoTasa>
</multiRef>
<multiRef id="id13" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:Ammount"
xmlns:ns8="http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<amt xsi:type="xsd:double">122.22</amt>
<curr xsi:type="xsd:string">EUR</curr>
</multiRef>
<multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns9:Tax" xmlns:ns9="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<amt xsi:type="xsd:string">10.221</amt>
<tipoTasa xsi:type="xsd:string">1ab</tipoTasa>
</multiRef>
<multiRef id="id10" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns10:Foid" xmlns:ns10="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<foid xsi:type="xsd:string">FOIDAAZAAAXAAAAFBOID</foid>
</multiRef>
<multiRef id="id12" soapenc:root="0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns11:Info" xmlns:ns11="
http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/">
<offc xsi:type="xsd:string">OFFCRESERBAOFFC</offc>
<iata xsi:type="xsd:string">IATARESERBAIATA</iata>
</multiRef>
.
.
.
.
</soapenv:Body>
</soapenv:Envelope>
My
Re: See SOAP message more readable.
Posted by Anne Thomas Manes <at...@gmail.com>.
See the Java2WSDL reference guide (
http://ws.apache.org/axis/java/reference.html#Java2WSDLReference):
-y, --style <argument>
The style of binding in the WSDL, either DOCUMENT, RPC, or WRAPPED.
-u, --use <argument>
The use of items in the binding, either LITERAL or ENCODED
Anne
On 6/20/06, Daniel Destro <da...@gmail.com> wrote:
>
> I think u must use the -u option when creating the WSDL file.
>
>
> On 6/20/06, Juan Alvarez <jalvarezrom@gmail.com > wrote:
> >
> > Hello again. How to do that? I imagine that when I generate the wsdl
> > from java there is an option to do that but I unsure about of that.
> >
> > thanks in advance.
> >
>
>
Re: See SOAP message more readable.
Posted by Daniel Destro <da...@gmail.com>.
I think u must use the -u option when creating the WSDL file.
On 6/20/06, Juan Alvarez <ja...@gmail.com> wrote:
>
> Hello again. How to do that? I imagine that when I generate the wsdl from
> java there is an option to do that but I unsure about of that.
>
> thanks in advance.
>
Re: See SOAP message more readable.
Posted by Juan Alvarez <ja...@gmail.com>.
Hello again. How to do that? I imagine that when I generate the wsdl from
java there is an option to do that but I unsure about of that.
thanks in advance.
Re: See SOAP message more readable.
Posted by Anne Thomas Manes <at...@gmail.com>.
Don't use SOAP Encoding. Use document/literal or rpc/literal instead.
Anne
On 6/19/06, Juan Alvarez <ja...@gmail.com> wrote:
>
> Hello all. I have a problem with the manner the axis generation of a SOAP
> message.
> I need to 'see' the message without multiRef or href tags but AXIS
> automatically generates that tags when I get it by means of method
> getSOAPPartAsString() of Message class .
> ¿Is there any manner to get the SOAP message but without that tags?
>
>
> Here is a piece of my SOAP message tha bring me AXIS :
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ns1:processTkt soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="
> impl.wsresiber.emision.iberia.com">
> <in0 href="#id0" />
> </ns1:processTkt>
> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TktInfo"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="
> http://ints.wsresiber.emision.iberia.com">
> <loc_r xsi:type="xsd:string">TT22A</loc_r>
> <loc_a xsi:type="xsd:string">AFX002</loc_a>
> <e_r xsi:type="xsd:string">endorsement restriction value</e_r>
> <name xsi:type="xsd:string">Jose Luis Moreno</name>
> <num_pax xsi:type="xsd:int">2</num_pax>
> <fp xsi:type="xsd:string">With VISA card.</fp>
> <b_fare href="#id1" />
> <eqv xsi:type="soapenc:double">232.222</eqv>
> <br xsi:type="soapenc:double">111.22</br>
> <taxes xsi:type="soapenc:Array"
> soapenc:arrayType="ns2:Tax[3]">
> <item href="#id2" />
> <item href="#id3" />
> <item href="#id4" />
> </taxes>
> <total href="#id5" />
> <tkts xsi:type="soapenc:Array" soapenc:arrayType="ns2:Tkt[2]">
> <item href="#id6" />
> <item href="#id7" />
> </tkts>
> <foids xsi:type="soapenc:Array"
> soapenc:arrayType="ns2:Foid[3]">
> <item href="#id8" />
> <item href="#id9" />
> <item href="#id10" />
> </foids>
> <tkt_date xsi:type="xsd:string">23OCT06</tkt_date>
> <tkt_1a href="#id11" />
> <bkg_1a href="#id12" />
> <ch xsi:type="soapenc:int">32</ch>
> <sf href="#id13" />
> <gran_tot href="#id14" />
> </multiRef>
> <multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Tkt" xmlns:ns3="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <tkt_nr xsi:type="xsd:string">1</tkt_nr>
> <f_calc xsi:type="xsd:string">Fare calc value</f_calc>
> <coupons xsi:type="soapenc:Array"
> soapenc:arrayType="ns3:Coupon[4]">
> <item href="#id15" />
> <item href="#id16" />
> <item href="#id17" />
> <item href="#id18" />
> </coupons>
> </multiRef>
> <multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Tkt" xmlns:ns4="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <tkt_nr xsi:type="xsd:string">2</tkt_nr>
> <f_calc xsi:type="xsd:string">Fare calc value</f_calc>
> <coupons xsi:type="soapenc:Array"
> soapenc:arrayType="ns4:Coupon[2]">
> <item href="#id19" />
> <item href="#id20" />
> </coupons>
> </multiRef>
> <multiRef id="id11" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns5:Info" xmlns:ns5="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <offc xsi:type="xsd:string">OFFCEMISIONOFFC</offc>
> <iata xsi:type="xsd:string">IATAEMIISONIATA</iata>
> </multiRef>
> <multiRef id="id9" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:Foid" xmlns:ns6="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <foid xsi:type="xsd:string">FOIDAACAAABAABAFOID</foid>
> </multiRef>
> <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:Tax" xmlns:ns7="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <amt xsi:type="xsd:string">10.221</amt>
> <tipoTasa xsi:type="xsd:string">1ab</tipoTasa>
> </multiRef>
> <multiRef id="id13" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:Ammount"
> xmlns:ns8="http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <amt xsi:type="xsd:double">122.22</amt>
> <curr xsi:type="xsd:string">EUR</curr>
> </multiRef>
> <multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns9:Tax" xmlns:ns9="
> http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <amt xsi:type="xsd:string">10.221</amt>
> <tipoTasa xsi:type="xsd:string">1ab</tipoTasa>
> </multiRef>
> <multiRef id="id10" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns10:Foid"
> xmlns:ns10="http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <foid xsi:type="xsd:string">FOIDAAZAAAXAAAAFBOID</foid>
> </multiRef>
> <multiRef id="id12" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns11:Info"
> xmlns:ns11="http://ints.wsresiber.emision.iberia.com" xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/">
> <offc xsi:type="xsd:string">OFFCRESERBAOFFC</offc>
> <iata xsi:type="xsd:string">IATARESERBAIATA</iata>
> </multiRef>
>
> .
> .
> .
> .
>
> </soapenv:Body>
>
> </soapenv:Envelope>
>
> My
>
>
>
>
>
>
>
[newbie howto] Create client under axis/apache/tomcat
Posted by "Taylor, Clarence B" <Cl...@ca.com>.
I have been able to get my service deployed on my "server" tomcat server
and can get results when I run a native application, i.e. an eclipse Run
main, where I specify the appropriate classpaths on the run statement.
I am looking for the "proper" way to integrate it into my "client"
tomcat server, which is a different machine than my "server" tomcat
server. I am trying put together a JSP that will call my axis client.
My axis service serves an array of classes(objects), where each
class/object consists of 3 simple strings. I am not sure where to put
what. That is on my "client" tomcat server where (what directories) do
I put a jsp that can call a flavor of the "test client"
(clientGetMyNames...not shown). I can probably kluge things up by
putting everything in the class path, but that feels wrong.
Any clues or help would be greatly appreciated.
Sample JSP page
<% MyNames[] mn;
mn = clientGetMyNames("test");
int l = mn.length();
for (int i = 0;i mn.length(); i++) {
out.println(mn[i].firstName+" "+mn[i].lastName);
} %>
Details:
the service:
public class MyTestSoapBindingImpl implements my.test.package.MyTest {
my.test.package.MyNames[] getMyNames(java.lang.String in0) throws
java.rmi.RemoteException {
MyNames[] mn = new MyNames[5];
.... code to fill in the mn array ....
Return mn;
}
}
package my.test.package;
public class MyNames {
String firstName;
String lastName;
String middleName;
}
The test client:
public static void main (String[] args) throws Exception {
try {
MyTest binding = new MyTestServiceLocator().getMyNames();
MyNames[] value = null;
value = binding.getMyNames("*");
if (value == null)
System.out.println("null results");
else {
System.out.println("length: "+value.length);
for (int i = 0;i < value.length;i++) {
MyNames mn = value[i];
if (mn != null) {
System.out.println("Struct["+i+"]:= first:
"+mn.firstName+
", last:"+mn.lastName+
", mid:"+mn.middleName);
}
else {
System.out.println("String["+i+"]:=
*novalue*");
}
}
}
}
catch (java.rmi.RemoteException re) {
System.out.println("error"+re.toString());
}
}
Thank you
Brad Taylor