Re: WSDL2Java generates code but fails compile

2006-05-30 Thread robert lazarski
I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here:

http://issues.apache.org/jira/

And create an account. Then create the issue under axis2, and follup up by uploading your wsdl . 

Robert
http://www.braziloutsource.com/On 5/30/06, B R [EMAIL PROTECTED]
 wrote:Hello,I have created a WSDL file (see below), and I am trying to generate
and compile java code for my web service. I can generate code, but antbuild fails with complains about org.apache.axiom.om.OMelement. Theerrors are about the method newXMLStreamReader() and variable Factory
within this interface.Specifically, I am trying to add a custom soap header in my requestand response.I noticed a mail from Davanum Srinivas for a similar problem to makeit a JIRA, but I don't know what JIRA is :-)
I appreciate any insights/alternatives.Thanks,BhaskarI use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional.My wsdl:---sample-address.wsdl-
?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/xmlns:tns=
http://foo.bar/servicexmlns:wsdl=http://schemas.xmlsoap.org/wsdl/xmlns:xsd=
http://www.w3.org/2001/XMLSchema name=TtsSgsTitleTransfertargetNamespace=http://foo.bar/service wsdl:types xsd:schema targetNamespace=
http://foo.bar/service xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:tns=
http://foo.bar/service xmlns=http://foo.bar/service  xsd:simpleType name=AddressLineTypexsd:restriction base=xsd:string
 xsd:maxLength value=50//xsd:restriction /xsd:simpleType xsd:simpleType name=CityTypexsd:restriction base=xsd:string
 xsd:maxLength value=25//xsd:restriction /xsd:simpleType xsd:simpleType name=StateTypexsd:restriction base=xsd:string
 xsd:maxLength value=2//xsd:restriction /xsd:simpleType xsd:simpleType name=ZIPTypexsd:restriction base=xsd:string
 xsd:maxLength value=12//xsd:restriction /xsd:simpleType xsd:simpleType name=CountryTypexsd:restriction base=xsd:string
 xsd:maxLength value=3//xsd:restriction /xsd:simpleType xsd:complexType name=AddressTypexsd:sequence

xsd:element name=line1 type=tns:AddressLineType/
xsd:element name=line2 type=tns:AddressLineTypeminOccurs=0/
xsd:element name=city type=tns:CityType/
xsd:element name=state type=tns:StateType/
xsd:element name=zip type=tns:ZIPType/
xsd:element name=country type=tns:CountryTypedefault=USA minOccurs=0//xsd:sequence /xsd:complexType xsd:complexType name=ResponseType
xsd:sequence
xsd:element name=transmissionId type=xsd:string/
xsd:element name=success type=xsd:string/
xsd:element name=errorMessage type=xsd:string//xsd:sequence /xsd:complexType xsd:complexType name=HeaderType
xsd:sequence
xsd:element name=clientId type=xsd:string//xsd:sequence /xsd:complexType xsd:element name=updateAddressResponseElement
type=tns:ResponseType/ xsd:element name=updateAddressRequestElementtype=tns:AddressType/ xsd:element name=updateAddressResponseHeader type=tns:HeaderType/
 xsd:element name=updateAddressRequestHeader type=tns:HeaderType//xsd:schema /wsdl:types wsdl:message name=updateAddressRequest
wsdl:part element=tns:updateAddressRequestElementname=addressRequest /wsdl:part name=updateAddressRequestHeaderelement=tns:updateAddressRequestHeader /
 /wsdl:message wsdl:message name=updateAddressResponsewsdl:part element=tns:updateAddressResponseElementname=addressResponse /wsdl:part name=updateAddressResponseHeader
element=tns:updateAddressResponseHeader / /wsdl:message wsdl:portType name=AddressPortwsdl:operation name=updateAddress wsdl:input name=updateAddressRequest
message=tns:updateAddressRequest / wsdl:output name=updateAddressResponsemessage=tns:updateAddressResponse //wsdl:operation /wsdl:portType
 wsdl:binding name=addressBinding type=tns:AddressPortsoap:binding style=documenttransport=http://schemas.xmlsoap.org/soap/http
 /wsdl:operation name=updateAddress soap:operation soapAction= / wsdl:input soap:header message=tns:updateAddressRequest
part=updateAddressRequestHeader use=literal/ soap:body use=literal parts=addressRequest / /wsdl:input wsdl:output
soap:header message=tns:updateAddressResponsepart=updateAddressResponseHeader use=literal/soap:body
use=literal parts=addressResponse / /wsdl:output/wsdl:operation /wsdl:binding wsdl:service name=AddressService
wsdl:port name=SOAPPortbinding=tns:addressBinding soap:address location=http://localhost:8080/AddressService
 //wsdl:port /wsdl:service/wsdl:definitions---My stack trace on compile error:
--C:\devtools\axis2-std-1.0-bin\samples\wsdlWSDL2Java -urisample-address.wsdl -sd -s -ss -d xmlbeans -p test.address -oaddress_srcUsing AXIS2_HOME: c:\devtools\axis2-
std-1.0-binUsing JAVA_HOME:C:\devtools\jdk1.5.0_03log4j:WARN No appenders could be found for 

Re: WSDL2Java generates code but fails compile

2006-05-30 Thread B R

Thanks, Robert. Will do that.

Are there any alternatives to create custom headers?

Bhaskar

On 5/30/06, robert lazarski [EMAIL PROTECTED] wrote:

I tested your wsdl and it's failing here too with the nightly build ... so
to file a jira, go here:

 http://issues.apache.org/jira/

 And create an account. Then create the issue under axis2, and follup up by
uploading your wsdl .

 Robert
 http://www.braziloutsource.com/


On 5/30/06, B R [EMAIL PROTECTED]  wrote:

Hello,

I have created a WSDL file (see below), and I am trying to generate
and compile java code for my web service. I can generate code, but ant
build fails with complains about org.apache.axiom.om.OMelement. The
errors are about the method newXMLStreamReader() and variable Factory
 within this interface.

Specifically, I am trying to add a custom soap header in my request
and response.

I noticed a mail from Davanum Srinivas for a similar problem to make
it a JIRA, but I don't know what JIRA is :-)

I appreciate any insights/alternatives.
Thanks,
Bhaskar

I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP
professional.
My wsdl:
---sample-address.wsdl-
?xml version=1.0 encoding=UTF-8?
wsdl:definitions
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:tns= http://foo.bar/service;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:xsd= http://www.w3.org/2001/XMLSchema;
name=TtsSgsTitleTransfer
targetNamespace=http://foo.bar/service;
   wsdl:types
 xsd:schema targetNamespace= http://foo.bar/service;
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   xmlns:tns= http://foo.bar/service;
   xmlns=http://foo.bar/service;   

 xsd:simpleType name=AddressLineType
xsd:restriction base=xsd:string
   xsd:maxLength value=50/
/xsd:restriction
 /xsd:simpleType

 xsd:simpleType name=CityType
xsd:restriction base=xsd:string
   xsd:maxLength value=25/
/xsd:restriction
 /xsd:simpleType

 xsd:simpleType name=StateType
xsd:restriction base=xsd:string
   xsd:maxLength value=2/
/xsd:restriction
 /xsd:simpleType

 xsd:simpleType name=ZIPType
xsd:restriction base=xsd:string
   xsd:maxLength value=12/
/xsd:restriction
 /xsd:simpleType

 xsd:simpleType name=CountryType
xsd:restriction base=xsd:string
   xsd:maxLength value=3/
/xsd:restriction
 /xsd:simpleType


 xsd:complexType name=AddressType
xsd:sequence
   xsd:element name=line1 type=tns:AddressLineType/
   xsd:element name=line2 type=tns:AddressLineType
minOccurs=0/
   xsd:element name=city type=tns:CityType/
   xsd:element name=state type=tns:StateType/
   xsd:element name=zip type=tns:ZIPType/
   xsd:element name=country type=tns:CountryType
default=USA minOccurs=0/
/xsd:sequence
 /xsd:complexType


 xsd:complexType name=ResponseType
xsd:sequence
   xsd:element name=transmissionId type=xsd:string/
   xsd:element name=success type=xsd:string/
   xsd:element name=errorMessage type=xsd:string/
/xsd:sequence
 /xsd:complexType

 xsd:complexType name=HeaderType
xsd:sequence
   xsd:element name=clientId type=xsd:string/
/xsd:sequence
 /xsd:complexType

 xsd:element name=updateAddressResponseElement
type=tns:ResponseType/
 xsd:element name=updateAddressRequestElement
type=tns:AddressType/
 xsd:element name=updateAddressResponseHeader
type=tns:HeaderType/
 xsd:element name=updateAddressRequestHeader
type=tns:HeaderType/
  /xsd:schema
   /wsdl:types

   wsdl:message name=updateAddressRequest
  wsdl:part element=tns:updateAddressRequestElement
name=addressRequest /
  wsdl:part name=updateAddressRequestHeader
element=tns:updateAddressRequestHeader /
   /wsdl:message

   wsdl:message name=updateAddressResponse
  wsdl:part element=tns:updateAddressResponseElement
name=addressResponse /
  wsdl:part name=updateAddressResponseHeader
element=tns:updateAddressResponseHeader /
   /wsdl:message

   wsdl:portType name=AddressPort
  wsdl:operation name=updateAddress
 wsdl:input name=updateAddressRequest
message=tns:updateAddressRequest /
 wsdl:output name=updateAddressResponse
message=tns:updateAddressResponse /
  /wsdl:operation
   /wsdl:portType

   wsdl:binding name=addressBinding type=tns:AddressPort
  soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http  /
  wsdl:operation name=updateAddress
 soap:operation soapAction= /
 wsdl:input
 soap:header message=tns:updateAddressRequest

Re: WSDL2Java generates code but fails compile

2006-05-30 Thread robert lazarski
The only one I know of is by code ... ServiceClient.addHeader() - or in a handler of course but basically the same idea. 

HTH,
Robert
http://www.braziloutsource.com/
On 5/30/06, B R [EMAIL PROTECTED] wrote:
Thanks, Robert. Will do that.Are there any alternatives to create custom headers?BhaskarOn 5/30/06, robert lazarski [EMAIL PROTECTED] wrote:
 I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here:http://issues.apache.org/jira/
And create an account. Then create the issue under axis2, and follup up by uploading your wsdl .Roberthttp://www.braziloutsource.com/
 On 5/30/06, B R [EMAIL PROTECTED]  wrote:  Hello, I have created a WSDL file (see below), and I am trying to generate
 and compile java code for my web service. I can generate code, but ant build fails with complains about org.apache.axiom.om.OMelement. The errors are about the method newXMLStreamReader() and variable Factory
within this interface. Specifically, I am trying to add a custom soap header in my request and response. I noticed a mail from Davanum Srinivas for a similar problem to make
 it a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives. Thanks, Bhaskar I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP
 professional. My wsdl: ---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns:tns= http://foo.bar/service
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/ xmlns:xsd= http://www.w3.org/2001/XMLSchema
 name=TtsSgsTitleTransfer targetNamespace=http://foo.bar/servicewsdl:typesxsd:schema targetNamespace= 
http://foo.bar/servicexmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:tns= 
http://foo.bar/servicexmlns=http://foo.bar/service xsd:simpleType name=AddressLineType xsd:restriction base=xsd:string
xsd:maxLength
value=50/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=CityType xsd:restriction base=xsd:string
xsd:maxLength
value=25/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=StateType xsd:restriction base=xsd:string
xsd:maxLength
value=2/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=ZIPType xsd:restriction base=xsd:string
xsd:maxLength
value=12/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=CountryType xsd:restriction base=xsd:string
xsd:maxLength
value=3/ /xsd:restriction/xsd:simpleTypexsd:complexType name=AddressType xsd:sequence
xsd:element
name=line1 type=tns:AddressLineType/xsd:element
name=line2 type=tns:AddressLineType minOccurs=0/xsd:element
name=city type=tns:CityType/xsd:element
name=state type=tns:StateType/xsd:element
name=zip type=tns:ZIPType/xsd:element
name=country type=tns:CountryType default=USA minOccurs=0/ /xsd:sequence/xsd:complexType
xsd:complexType name=ResponseType xsd:sequencexsd:element
name=transmissionId type=xsd:string/xsd:element
name=success type=xsd:string/xsd:element
name=errorMessage type=xsd:string/ /xsd:sequence/xsd:complexTypexsd:complexType name=HeaderType
 xsd:sequencexsd:element
name=clientId type=xsd:string/ /xsd:sequence/xsd:complexTypexsd:element name=updateAddressResponseElement
 type=tns:ResponseType/xsd:element name=updateAddressRequestElement type=tns:AddressType/xsd:element name=updateAddressResponseHeader
 type=tns:HeaderType/xsd:element name=updateAddressRequestHeader type=tns:HeaderType/ /xsd:schema/wsdl:types
wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElement name=addressRequest / wsdl:part name=updateAddressRequestHeader
 element=tns:updateAddressRequestHeader //wsdl:messagewsdl:message name=updateAddressResponse wsdl:part element=tns:updateAddressResponseElement
 name=addressResponse / wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader //wsdl:message
wsdl:portType name=AddressPort wsdl:operation name=updateAddresswsdl:input name=updateAddressRequest message=tns:updateAddressRequest /
wsdl:output name=updateAddressResponse message=tns:updateAddressResponse / /wsdl:operation/wsdl:portTypewsdl:binding name=addressBinding type=tns:AddressPort
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http  / wsdl:operation name=updateAddress
soap:operation soapAction= /wsdl:inputsoap:header message=tns:updateAddressRequest part=updateAddressRequestHeader use=literal/
soap:body use=literal parts=addressRequest //wsdl:inputwsdl:output soap:header message=tns:updateAddressResponse
 part=updateAddressResponseHeader use=literal/
soap:body use=literal parts=addressResponse //wsdl:output /wsdl:operation/wsdl:bindingwsdl:service name=AddressService
 wsdl:port name=SOAPPort
binding=tns:addressBindingsoap:address location=http://localhost:8080/AddressService  / /wsdl:port
/wsdl:service /wsdl:definitions --- My stack trace on compile error:
 

Re: WSDL2Java generates code but fails compile

2006-05-30 Thread B R

Created JIRA  (key: AXIS2-784) as a bug. Please let me know if any
more info is needed.

Thanks,
Bhaskar


On 5/30/06, B R [EMAIL PROTECTED] wrote:

Thanks, Robert. Will do that.

Are there any alternatives to create custom headers?

Bhaskar

On 5/30/06, robert lazarski [EMAIL PROTECTED] wrote:
 I tested your wsdl and it's failing here too with the nightly build ... so
 to file a jira, go here:

  http://issues.apache.org/jira/

  And create an account. Then create the issue under axis2, and follup up by
 uploading your wsdl .

  Robert
  http://www.braziloutsource.com/


 On 5/30/06, B R [EMAIL PROTECTED]  wrote:
 
 Hello,

 I have created a WSDL file (see below), and I am trying to generate
 and compile java code for my web service. I can generate code, but ant
 build fails with complains about org.apache.axiom.om.OMelement. The
 errors are about the method newXMLStreamReader() and variable Factory
  within this interface.

 Specifically, I am trying to add a custom soap header in my request
 and response.

 I noticed a mail from Davanum Srinivas for a similar problem to make
 it a JIRA, but I don't know what JIRA is :-)

 I appreciate any insights/alternatives.
 Thanks,
 Bhaskar

 I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP
 professional.
 My wsdl:
 
---sample-address.wsdl-
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:tns= http://foo.bar/service;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:xsd= http://www.w3.org/2001/XMLSchema;
 name=TtsSgsTitleTransfer
 targetNamespace=http://foo.bar/service;
wsdl:types
  xsd:schema targetNamespace= http://foo.bar/service;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:tns= http://foo.bar/service;
xmlns=http://foo.bar/service;   

  xsd:simpleType name=AddressLineType
 xsd:restriction base=xsd:string
xsd:maxLength value=50/
 /xsd:restriction
  /xsd:simpleType

  xsd:simpleType name=CityType
 xsd:restriction base=xsd:string
xsd:maxLength value=25/
 /xsd:restriction
  /xsd:simpleType

  xsd:simpleType name=StateType
 xsd:restriction base=xsd:string
xsd:maxLength value=2/
 /xsd:restriction
  /xsd:simpleType

  xsd:simpleType name=ZIPType
 xsd:restriction base=xsd:string
xsd:maxLength value=12/
 /xsd:restriction
  /xsd:simpleType

  xsd:simpleType name=CountryType
 xsd:restriction base=xsd:string
xsd:maxLength value=3/
 /xsd:restriction
  /xsd:simpleType


  xsd:complexType name=AddressType
 xsd:sequence
xsd:element name=line1 type=tns:AddressLineType/
xsd:element name=line2 type=tns:AddressLineType
 minOccurs=0/
xsd:element name=city type=tns:CityType/
xsd:element name=state type=tns:StateType/
xsd:element name=zip type=tns:ZIPType/
xsd:element name=country type=tns:CountryType
 default=USA minOccurs=0/
 /xsd:sequence
  /xsd:complexType


  xsd:complexType name=ResponseType
 xsd:sequence
xsd:element name=transmissionId type=xsd:string/
xsd:element name=success type=xsd:string/
xsd:element name=errorMessage type=xsd:string/
 /xsd:sequence
  /xsd:complexType

  xsd:complexType name=HeaderType
 xsd:sequence
xsd:element name=clientId type=xsd:string/
 /xsd:sequence
  /xsd:complexType

  xsd:element name=updateAddressResponseElement
 type=tns:ResponseType/
  xsd:element name=updateAddressRequestElement
 type=tns:AddressType/
  xsd:element name=updateAddressResponseHeader
 type=tns:HeaderType/
  xsd:element name=updateAddressRequestHeader
 type=tns:HeaderType/
   /xsd:schema
/wsdl:types

wsdl:message name=updateAddressRequest
   wsdl:part element=tns:updateAddressRequestElement
 name=addressRequest /
   wsdl:part name=updateAddressRequestHeader
 element=tns:updateAddressRequestHeader /
/wsdl:message

wsdl:message name=updateAddressResponse
   wsdl:part element=tns:updateAddressResponseElement
 name=addressResponse /
   wsdl:part name=updateAddressResponseHeader
 element=tns:updateAddressResponseHeader /
/wsdl:message

wsdl:portType name=AddressPort
   wsdl:operation name=updateAddress
  wsdl:input name=updateAddressRequest
 message=tns:updateAddressRequest /
  wsdl:output name=updateAddressResponse
 message=tns:updateAddressResponse /
   /wsdl:operation
/wsdl:portType

wsdl:binding name=addressBinding