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 James Armstrong <ja...@carl.org> on 2006/05/09 19:06:34 UTC

RE: Ant axis-java2wsdl not giving me the implementation parameter names

Hi,

Was wondering if someone can tell  me how to the axis-java2wsdl ant task to
produce a wsdl with actual implementation parameters names instead of  in0,
in1, etc.

 

Here is my ant task:

 

<target name="java2wsdl" depends="compileSource" description="Generates a
WSDL description.">

                        <axis-java2wsdl output="${wsdl.file}"
classname="${classname}" namespace="${service.namespace}"
methods="${wsdl.methods}" use="${wsdl.use}" style="${wsdl.style}"
location="${service.url}"/>

                        <echo message="java2wsdl has been completed."/>

            </target>

 

Here are my property values:

 

<property name="wsdl.methods"
value="patronEdit,validatePph,validatePip,validatePatron,storeID,getReturn,r
enewAll,renew,register,placeHold,deleteHold,payFines,chargeItems,itemInfo,pa
tronInfo"/>

            <property name="wsdl.file"
value="${target.src.dir}\org\carl\ops\webServices\autogenerated\OPSWebServic
es.wsdl"/>

            <property name="wsdl.style" value="WRAPPED"/>

            <property name="wsdl.use" value="LITERAL"/>

 

Here is a snap shot of generated wsdl:

 

<element name="patronEdit">

    <complexType>

     <sequence>

      <element name="in0" type="xsd:string"/>

      <element name="in1" type="xsd:string"/>

      <element name="in2" type="xsd:string"/>

      <element name="in3" type="xsd:string"/>

      <element name="in4" type="xsd:string"/>

      <element name="in5" type="xsd:string"/>

      <element name="in6" type="xsd:string"/>

      <element name="in7" type="xsd:string"/>

      <element name="in8" type="xsd:string"/>

      <element name="in9" type="xsd:string"/>

      <element name="in10" type="xsd:string"/>

      <element name="in11" type="xsd:string"/>

     </sequence>

 

Here's what they need to be:

 

String patronEdit(String pid,

                         String reverse_id,

                         String field_nameLast,

                         String field_nameFirst,

                         String field_email,

                         String field_addressStreet,

                         String field_addressCity,

                         String field_addressState,

                         String field_addressZipCode,

                         String field_phone,

                         String field_dob,

                         String uri

                         );

 

TIA,

James

 

  _____  

From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Tuesday, May 09, 2006 8:32 AM
To: axis-user@ws.apache.org
Subject: Re: Strange numbers / artifact in SOAP response using TCPMonitor
(Axis 1.3)

 

It's valid. The numbers represent chunking.

On 5/9/06, Collin VanDyck <collin.vandyck@hannonhill.com > wrote:

I have changed from using an Axis client to using a manual POST of the
SOAP message to a wrapped service.  Since I've done this, I am receiving
numbers before and after the SOAP envelope response.

The SOAP request looks like this (namespaces removed for clarity):

POST /webservice/services/ConcatService HTTP/1.1 
Content-Type: application/soap+xml; charset=UTF-8
SOAPAction: ""
User-Agent: Java/1.5.0_06
Host: localhost:8070
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive 
Content-Length: 604

<?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope ...>
       <soapenv:Body>
          <concat xmlns="myns">
            <Message> 
                <authentication>
                   <username>myname</username>
                   <password>mypassword</password>
                </authentication>
                <choices> 
                   <one>Hi </one>
                   <two>There </two>
                   <three>Again</three>
                </choices>
             </Message> 
          </concat>
       </soapenv:Body>
    </soapenv:Envelope>

The SOAP response looks like this:

HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-3.2.7 (build: 
CVSTag=JBoss_3_2_7 date=200501280217)
Content-Type: application/soap+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 09 May 2006 13:23:55 GMT
Server: Apache-Coyote/1.1

185
<?xml version=" 1.0" encoding="UTF-8"?>
    <soapenv:Envelope ...>
       <soapenv:Body>
          <concatResponse xmlns="myns">
             <concatReturn>Hi There Again</concatReturn> 
          </concatResponse>
       </soapenv:Body>
    </soapenv:Envelope>
0

When I used the Axis client to make a similar request, I didn't see the
numbers show up in the SOAP response.  Is this a valid response? 

Thanks
Collin

 


RE: Ant axis-java2wsdl not giving me the implementation parameter names

Posted by James Armstrong <ja...@carl.org>.
Found solution: add 

 

<property name="compile.debug" value="true"/>

            <!--for some reason the debuglevel has to be set to get the
formal method parameter names-->

            <property name="compile.debuglevel" value="lines,vars,source"/>

 

To the javac target, ie debug="${compile.debug}" and
debuglevel="${compile.debuglevel}" to the javac target.

 

Now I get the implementation parameter names instead of in0, in1,..

james

 

  _____  

From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Tuesday, May 09, 2006 11:54 AM
To: axis-user@ws.apache.org
Subject: Re: Ant axis-java2wsdl not giving me the implementation parameter
names

 

Compile your Java class with debug on, then run java2wsdl.

Anne

On 5/9/06, James Armstrong <jarmstro@carl.org  <ma...@carl.org> >
wrote:

Hi,

Was wondering if someone can tell  me how to the axis-java2wsdl ant task to
produce a wsdl with actual implementation parameters names instead of  in0,
in1, etc.

 

Here is my ant task:

 

<target name="java2wsdl" depends="compileSource" description="Generates a
WSDL description.">

                        <axis-java2wsdl output="${wsdl.file}"
classname="${classname}" namespace="${service.namespace}"
methods="${wsdl.methods}" use="${wsdl.use}" style="${wsdl.style}"
location="${service.url}"/>

                        <echo message="java2wsdl has been completed."/>

            </target>

 

Here are my property values:

 

<property name="wsdl.methods"
value="patronEdit,validatePph,validatePip,validatePatron,storeID,getReturn,r
enewAll,renew,register,placeHold,deleteHold,payFines,chargeItems,itemInfo,pa
tronInfo"/>

            <property name="wsdl.file"
value="${target.src.dir}\org\carl\ops\webServices\autogenerated\OPSWebServic
es.wsdl"/>

            <property name="wsdl.style" value="WRAPPED"/>

            <property name="wsdl.use" value="LITERAL"/>

 

Here is a snap shot of generated wsdl:

 

<element name="patronEdit">

    <complexType>

     <sequence>

      <element name="in0" type="xsd:string"/>

      <element name="in1" type="xsd:string"/>

      <element name="in2" type="xsd:string"/>

      <element name="in3" type="xsd:string"/>

      <element name="in4" type="xsd:string"/>

      <element name="in5" type="xsd:string"/>

      <element name="in6" type="xsd:string"/>

      <element name="in7" type="xsd:string"/>

      <element name="in8" type="xsd:string"/>

      <element name="in9" type="xsd:string"/>

      <element name="in10" type="xsd:string"/>

      <element name="in11" type="xsd:string"/>

     </sequence>

 

Here's what they need to be:

 

String patronEdit(String pid,

                         String reverse_id,

                         String field_nameLast,

                         String field_nameFirst,

                         String field_email,

                         String field_addressStreet,

                         String field_addressCity,

                         String field_addressState,

                         String field_addressZipCode,

                         String field_phone,

                         String field_dob,

                         String uri

                         );

 

TIA,

James

 

  _____  

From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Tuesday, May 09, 2006 8:32 AM
To: axis-user@ws.apache.org
Subject: Re: Strange numbers / artifact in SOAP response using TCPMonitor
(Axis 1.3)

 

It's valid. The numbers represent chunking.

On 5/9/06, Collin VanDyck <collin.vandyck@hannonhill.com > wrote:

I have changed from using an Axis client to using a manual POST of the
SOAP message to a wrapped service.  Since I've done this, I am receiving
numbers before and after the SOAP envelope response.

The SOAP request looks like this (namespaces removed for clarity):

POST /webservice/services/ConcatService HTTP/1.1 
Content-Type: application/soap+xml; charset=UTF-8
SOAPAction: ""
User-Agent: Java/1.5.0_06
Host: localhost:8070
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive 

<?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope ...>
       <soapenv:Body>
          <concat xmlns="myns">
            <Message> 
                <authentication>
                   <username>myname</username>
                   <password>mypassword</password>
                </authentication>
                <choices> 
                   <one>Hi </one>
                   <two>There </two>
                   <three>Again</three>
                </choices>
             </Message> 
          </concat>
       </soapenv:Body>
    </soapenv:Envelope>

The SOAP response looks like this:

HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-3.2.7 (build: 
CVSTag=JBoss_3_2_7 date=200501280217)
Content-Type: application/soap+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 09 May 2006 13:23:55 GMT
Server: Apache-Coyote/1.1

185
<?xml version=" 1.0" encoding="UTF-8"?>
    <soapenv:Envelope ...>
       <soapenv:Body>
          <concatResponse xmlns="myns">
             <concatReturn>Hi There Again</concatReturn> 
          </concatResponse>
       </soapenv:Body>
    </soapenv:Envelope>
0

When I used the Axis client to make a similar request, I didn't see the
numbers show up in the SOAP response.  Is this a valid response? 

Thanks
Collin

 

 


Re: Ant axis-java2wsdl not giving me the implementation parameter names

Posted by Anne Thomas Manes <at...@gmail.com>.
Compile your Java class with debug on, then run java2wsdl.

Anne

On 5/9/06, James Armstrong <ja...@carl.org> wrote:
>
>  Hi,
>
> Was wondering if someone can tell  me how to the axis-java2wsdl ant task
> to produce a wsdl with actual implementation parameters names instead of
> in0, in1, etc.
>
>
>
> Here is my ant task:
>
>
>
> <target name="java2wsdl" depends="compileSource" description="Generates a
> WSDL description.">
>
>                         <axis-java2wsdl output="${wsdl.file}"
> classname="${classname}" namespace="${service.namespace}" methods="${
> wsdl.methods}" use="${wsdl.use}" style="${wsdl.style}" location="${
> service.url}"/>
>
>                         <echo message="java2wsdl has been completed."/>
>
>             </target>
>
>
>
> Here are my property values:
>
>
>
> <property name="wsdl.methods"
> value="patronEdit,validatePph,validatePip,validatePatron,storeID,getReturn,renewAll,renew,register,placeHold,deleteHold,payFines,chargeItems,itemInfo,patronInfo"/>
>
>             <property name="wsdl.file" value="${target.src.dir
> }\org\carl\ops\webServices\autogenerated\OPSWebServices.wsdl"/>
>
>             <property name="wsdl.style" value="WRAPPED"/>
>
>             <property name="wsdl.use" value="LITERAL"/>
>
>
>
> Here is a snap shot of generated wsdl:
>
>
>
> <element name="patronEdit">
>
>     <complexType>
>
>      <sequence>
>
>       <element name="in0" type="xsd:string"/>
>
>       <element name="in1" type="xsd:string"/>
>
>       <element name="in2" type="xsd:string"/>
>
>       <element name="in3" type="xsd:string"/>
>
>       <element name="in4" type="xsd:string"/>
>
>       <element name="in5" type="xsd:string"/>
>
>       <element name="in6" type="xsd:string"/>
>
>       <element name="in7" type="xsd:string"/>
>
>       <element name="in8" type="xsd:string"/>
>
>       <element name="in9" type="xsd:string"/>
>
>       <element name="in10" type="xsd:string"/>
>
>       <element name="in11" type="xsd:string"/>
>
>      </sequence>
>
>
>
> Here's what they need to be:
>
>
>
> String patronEdit(String pid,
>
>                          String reverse_id,
>
>                          String field_nameLast,
>
>                          String field_nameFirst,
>
>                          String field_email,
>
>                          String field_addressStreet,
>
>                          String field_addressCity,
>
>                          String field_addressState,
>
>                          String field_addressZipCode,
>
>                          String field_phone,
>
>                          String field_dob,
>
>                          String uri
>
>                          );
>
>
>
> TIA,
>
> James
>
>
>  ------------------------------
>
> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
> *Sent:* Tuesday, May 09, 2006 8:32 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Strange numbers / artifact in SOAP response using
> TCPMonitor (Axis 1.3)
>
>
>
> It's valid. The numbers represent chunking.
>
> On 5/9/06, *Collin VanDyck* <collin.vandyck@hannonhill.com > wrote:
>
> I have changed from using an Axis client to using a manual POST of the
> SOAP message to a wrapped service.  Since I've done this, I am receiving
> numbers before and after the SOAP envelope response.
>
> The SOAP request looks like this (namespaces removed for clarity):
>
> POST /webservice/services/ConcatService HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8
> SOAPAction: ""
> User-Agent: Java/1.5.0_06
> Host: localhost:8070
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Connection: keep-alive
> Content-Length: 604
>
> <?xml version="1.0" encoding="UTF-8"?>
>     <soapenv:Envelope ...>
>        <soapenv:Body>
>           <concat xmlns="myns">
>             <Message>
>                 <authentication>
>                    <username>myname</username>
>                    <password>mypassword</password>
>                 </authentication>
>                 <choices>
>                    <one>Hi </one>
>                    <two>There </two>
>                    <three>Again</three>
>                 </choices>
>              </Message>
>           </concat>
>        </soapenv:Body>
>     </soapenv:Envelope>
>
> The SOAP response looks like this:
>
> HTTP/1.1 200 OK
> X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-3.2.7 (build:
> CVSTag=JBoss_3_2_7 date=200501280217)
> Content-Type: application/soap+xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Tue, 09 May 2006 13:23:55 GMT
> Server: Apache-Coyote/1.1
>
> 185
> <?xml version=" 1.0" encoding="UTF-8"?>
>     <soapenv:Envelope ...>
>        <soapenv:Body>
>           <concatResponse xmlns="myns">
>              <concatReturn>Hi There Again</concatReturn>
>           </concatResponse>
>        </soapenv:Body>
>     </soapenv:Envelope>
> 0
>
> When I used the Axis client to make a similar request, I didn't see the
> numbers show up in the SOAP response.  Is this a valid response?
>
> Thanks
> Collin
>
>
>