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 Marc Lefebvre <ml...@akimeka.com> on 2008/07/21 21:15:47 UTC

HELP: Invalid WSDL generated by Java2WSDL

I'm using POJO web service development, and have generated a WSDL using Java2WSDL, which seems to be invalid.  When I import this WSDL into my XML firewall it says its invalid.  I then loaded into XMLSpy to do a validation on it, and it reports errors:

attribute 'part' in element '<mine: content>' refers to part 'sendFile SWA' which could not be found in message 'sendFileSWARequest'

So, Here is what I am seeing:

In the message part of the WSDL this is being generated:

<wsdl:message name="sendFileSWARequest">
     <wsdl:part name="parameters" element="ns:sendFileSWA"/>
</wsdl:message>

And the operation part of the WSDL, this is being generated:

<wsdl:binding name="SOATestLabServiceHttpBinding" type="ns:SOATestLabServicePortType">
   <http:binding verb="POST"/>
      <wsdl:operation name="sendFileSWA">
         <http:operation location="SOATestLabService/sendFileSWA"/>
         <wsdl:input>
            <mime:content type="text/xml" part="sendFileSWA"/> 
        </wsdl:input> 
        <wsdl:output>
           <mime:content type="text/xml" part="sendFileSWA"/>
       </wsdl:output>
</wsdl:operation>

 

Notice above that the part name is being called 'parameters', and is called that for each and ever message part being generated.   However, when the operation section references this message part its being called the name of the method that is invoking this ('sendFileSWA' in this example).  It appears that the message parts are not being generated correctly. 

For your reference, when I import the WSDL into my Datapower XML Firewall, it gives me this error:

Fatal Error at line 660: message part sendFileSWA not found.

Attached is my WSDL.  How do I get the WSDL to generate properly or is this a bug, or is my firewall being overly strict?  

Thanks!

 


RE: HELP: Invalid WSDL generated by Java2WSDL

Posted by Marc Lefebvre <ml...@akimeka.com>.
Thanks for your help....
 
This parameter is added to where?  
 
I'm using the command line version of Java2WSDL.
__
Marc Lefebvre, Principle Software Engineer
Akimeka, 1305 N. Holopono Street, Kihei, HI 96753 
Phone: (808)442-7168, Email: mlefebvre@akimeka.com
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc

________________________________

From: Deepal jayasinghe [mailto:deepalk@gmail.com]
Sent: Tue 7/22/2008 5:37 PM
To: axis-user@ws.apache.org
Subject: Re: HELP: Invalid WSDL generated by Java2WSDL



As I can see the problem is due to the HTTP binding , some WSDL
validators can not validate HTTP binding. That might be the reason
behind you getting this error. One way to overcome this is to not to
generate the HTTP binding. You can do that by adding the following
parameter.

<parameter name="disableREST">true</parameter >

into your services.xml.
> I'm using POJO web service development, and have generated a WSDL using Java2WSDL, which seems to be invalid.  When I import this WSDL into my XML firewall it says its invalid.  I then loaded into XMLSpy to do a validation on it, and it reports errors:
>
> attribute 'part' in element '<mine: content>' refers to part 'sendFile SWA' which could not be found in message 'sendFileSWARequest'
>
> So, Here is what I am seeing:
>
> In the message part of the WSDL this is being generated:
>
> <wsdl:message name="sendFileSWARequest">
>      <wsdl:part name="parameters" element="ns:sendFileSWA"/>
> </wsdl:message>
>
> And the operation part of the WSDL, this is being generated:
>
> <wsdl:binding name="SOATestLabServiceHttpBinding" type="ns:SOATestLabServicePortType">
>    <http:binding verb="POST"/>
>       <wsdl:operation name="sendFileSWA">
>          <http:operation location="SOATestLabService/sendFileSWA"/>
>          <wsdl:input>
>             <mime:content type="text/xml" part="sendFileSWA"/>
>         </wsdl:input>
>         <wsdl:output>
>            <mime:content type="text/xml" part="sendFileSWA"/>
>        </wsdl:output>
> </wsdl:operation>
>
> 
>
> Notice above that the part name is being called 'parameters', and is called that for each and ever message part being generated.   However, when the operation section references this message part its being called the name of the method that is invoking this ('sendFileSWA' in this example).  It appears that the message parts are not being generated correctly.
>
> For your reference, when I import the WSDL into my Datapower XML Firewall, it gives me this error:
>
> Fatal Error at line 660: message part sendFileSWA not found.
>
> Attached is my WSDL.  How do I get the WSDL to generate properly or is this a bug, or is my firewall being overly strict? 
>
> Thanks!
>
> 
>
>  
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


--
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: HELP: Invalid WSDL generated by Java2WSDL

Posted by Deepal jayasinghe <de...@gmail.com>.
As I can see the problem is due to the HTTP binding , some WSDL 
validators can not validate HTTP binding. That might be the reason 
behind you getting this error. One way to overcome this is to not to 
generate the HTTP binding. You can do that by adding the following 
parameter.

<parameter name="disableREST">true</parameter >

into your services.xml.
> I'm using POJO web service development, and have generated a WSDL using Java2WSDL, which seems to be invalid.  When I import this WSDL into my XML firewall it says its invalid.  I then loaded into XMLSpy to do a validation on it, and it reports errors:
>
> attribute 'part' in element '<mine: content>' refers to part 'sendFile SWA' which could not be found in message 'sendFileSWARequest'
>
> So, Here is what I am seeing:
>
> In the message part of the WSDL this is being generated:
>
> <wsdl:message name="sendFileSWARequest">
>      <wsdl:part name="parameters" element="ns:sendFileSWA"/>
> </wsdl:message>
>
> And the operation part of the WSDL, this is being generated:
>
> <wsdl:binding name="SOATestLabServiceHttpBinding" type="ns:SOATestLabServicePortType">
>    <http:binding verb="POST"/>
>       <wsdl:operation name="sendFileSWA">
>          <http:operation location="SOATestLabService/sendFileSWA"/>
>          <wsdl:input>
>             <mime:content type="text/xml" part="sendFileSWA"/> 
>         </wsdl:input> 
>         <wsdl:output>
>            <mime:content type="text/xml" part="sendFileSWA"/>
>        </wsdl:output>
> </wsdl:operation>
>
>  
>
> Notice above that the part name is being called 'parameters', and is called that for each and ever message part being generated.   However, when the operation section references this message part its being called the name of the method that is invoking this ('sendFileSWA' in this example).  It appears that the message parts are not being generated correctly. 
>
> For your reference, when I import the WSDL into my Datapower XML Firewall, it gives me this error:
>
> Fatal Error at line 660: message part sendFileSWA not found.
>
> Attached is my WSDL.  How do I get the WSDL to generate properly or is this a bug, or is my firewall being overly strict?  
>
> Thanks!
>
>  
>
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org


-- 
Thanks,
Deepal
................................................................
http://blogs.deepal.org/



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org