You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Gillen, Paul" <pa...@nscorp.com> on 2009/06/08 15:49:21 UTC

XmlBeans scomp to compile a WSDL

I've got a WSDL that contains in part: 

            <wsdl:message name="RequestMessage">

                        <wsdl:part name="reqParameter"
element="r:Request"/>

            </wsdl:message>

 

"r:Request" refers to an external XSD.  When I compile the WSDL using
scomp I get classes generated for "Request" but not "RequestMessage".
The XML generated from the WSDL however is "RequestMessage" so I can't
use the scomp generated classes to validate the WSDL generated XML
document.

 

... unless I'm doing (or not doing) something stupid.

 

=Paul=


RE: XmlBeans scomp to compile a WSDL

Posted by Radu Preotiuc-Pietro <ra...@oracle.com>.
The thing about WSDL processing by XMLBeans is that it doesn't traverse WSDL imports: it just extracts the <schema> sections and processes those. On the other hand, I was kind of expectig Axis to do it... Maybe a question for Axis?
 
Radu


  _____  

From: Gillen, Paul [mailto:paul.gillen@nscorp.com] 
Sent: Monday, June 08, 2009 1:28 PM
To: user@xmlbeans.apache.org
Subject: RE: XmlBeans scomp to compile a WSDL



If I said what I've been tasked with doing it might help.  The system logs all XML in/out, some from web services, some from other sources.  Each XML document can be viewed in a web page.  I've been asked to add a "validate" button, i.e. is this valid per the relevant XSD?  XMLBeans seems like a pretty straight-forward solution.  

 

For the "XSD generated" types I wrote a program that will accept a classname as a String and the XML as a string.  The program instantiates the class, parses the XML, and validates it using XMLBeans facilities.  I'm hoping I won't have to do something different for XML from a WSDL.

 

That having been said I tried the Axis2 advice:

      wsdl2java -d xmlbeans -uri wsdl\my.wsdl

      ant

 

No RequestMessageDocument.class was in the generated jar.

 

The XML as logged is:

      <RequestMessage>...</RequestMessage>

 

Is my objective achievable using XmlBeans, Axis2, or any other software?

 

Paul

 

-----Original Message-----
From: Jacob Danner [mailto:jacob.danner@gmail.com] 
Sent: Monday, June 08, 2009 12:25 PM
To: user@xmlbeans.apache.org
Subject: Re: XmlBeans scomp to compile a WSDL

 

RequestMessage would only be created if it was defined in any of the

XSDs referenced in the WSDL. I'm guessing your WSDL is not of the

document/literal variety as you were expecting.

If you are looking for something you can use to bind messages to Java

for working with webservices, try Axis2 as its a pretty full and

complete stack that has bindings for working with XMLBeans.

 

On Mon, Jun 8, 2009 at 6:49 AM, Gillen, Paul<pa...@nscorp.com> wrote:

> I've got a WSDL that contains in part:

> 

>             <wsdl:message name="RequestMessage">

> 

>                         <wsdl:part name="reqParameter" element="r:Request"/>

> 

>             </wsdl:message>

> 

> 

> 

> "r:Request" refers to an external XSD.  When I compile the WSDL using scomp

> I get classes generated for "Request" but not "RequestMessage".  The XML

> generated from the WSDL however is "RequestMessage" so I can't use the scomp

> generated classes to validate the WSDL generated XML document.

> 

> 

> 

> . unless I'm doing (or not doing) something stupid.

> 

> 

> 

> =Paul=

 

---------------------------------------------------------------------

To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org

For additional commands, e-mail: user-help@xmlbeans.apache.org

 

 

RE: XmlBeans scomp to compile a WSDL

Posted by "Gillen, Paul" <pa...@nscorp.com>.
If I said what I've been tasked with doing it might help.  The system
logs all XML in/out, some from web services, some from other sources.
Each XML document can be viewed in a web page.  I've been asked to add a
"validate" button, i.e. is this valid per the relevant XSD?  XMLBeans
seems like a pretty straight-forward solution.  

 

For the "XSD generated" types I wrote a program that will accept a
classname as a String and the XML as a string.  The program instantiates
the class, parses the XML, and validates it using XMLBeans facilities.
I'm hoping I won't have to do something different for XML from a WSDL.

 

That having been said I tried the Axis2 advice:

      wsdl2java -d xmlbeans -uri wsdl\my.wsdl

      ant

 

No RequestMessageDocument.class was in the generated jar.

 

The XML as logged is:

      <RequestMessage>...</RequestMessage>

 

Is my objective achievable using XmlBeans, Axis2, or any other software?

 

Paul

 

-----Original Message-----
From: Jacob Danner [mailto:jacob.danner@gmail.com] 
Sent: Monday, June 08, 2009 12:25 PM
To: user@xmlbeans.apache.org
Subject: Re: XmlBeans scomp to compile a WSDL

 

RequestMessage would only be created if it was defined in any of the

XSDs referenced in the WSDL. I'm guessing your WSDL is not of the

document/literal variety as you were expecting.

If you are looking for something you can use to bind messages to Java

for working with webservices, try Axis2 as its a pretty full and

complete stack that has bindings for working with XMLBeans.

 

On Mon, Jun 8, 2009 at 6:49 AM, Gillen, Paul<pa...@nscorp.com>
wrote:

> I've got a WSDL that contains in part:

> 

>             <wsdl:message name="RequestMessage">

> 

>                         <wsdl:part name="reqParameter"
element="r:Request"/>

> 

>             </wsdl:message>

> 

> 

> 

> "r:Request" refers to an external XSD.  When I compile the WSDL using
scomp

> I get classes generated for "Request" but not "RequestMessage".  The
XML

> generated from the WSDL however is "RequestMessage" so I can't use the
scomp

> generated classes to validate the WSDL generated XML document.

> 

> 

> 

> ... unless I'm doing (or not doing) something stupid.

> 

> 

> 

> =Paul=

 

---------------------------------------------------------------------

To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org

For additional commands, e-mail: user-help@xmlbeans.apache.org

 

 


Re: XmlBeans scomp to compile a WSDL

Posted by Jacob Danner <ja...@gmail.com>.
RequestMessage would only be created if it was defined in any of the
XSDs referenced in the WSDL. I'm guessing your WSDL is not of the
document/literal variety as you were expecting.
If you are looking for something you can use to bind messages to Java
for working with webservices, try Axis2 as its a pretty full and
complete stack that has bindings for working with XMLBeans.

On Mon, Jun 8, 2009 at 6:49 AM, Gillen, Paul<pa...@nscorp.com> wrote:
> I’ve got a WSDL that contains in part:
>
>             <wsdl:message name="RequestMessage">
>
>                         <wsdl:part name="reqParameter" element="r:Request"/>
>
>             </wsdl:message>
>
>
>
> “r:Request” refers to an external XSD.  When I compile the WSDL using scomp
> I get classes generated for “Request” but not “RequestMessage”.  The XML
> generated from the WSDL however is “RequestMessage” so I can’t use the scomp
> generated classes to validate the WSDL generated XML document.
>
>
>
> … unless I’m doing (or not doing) something stupid.
>
>
>
> =Paul=

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