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 Michael Moser <mm...@zurich.ibm.com> on 2006/11/17 15:29:24 UTC

WSDL2Java: generates code with compile error

When running WSDL2Java I am getting two classes on which the compiler 
yells:

ClassifiedServiceMessageReceiverInOnly.java line 296
The method getNamespaceURI() is undefined for the type OMNamespace

ClassifiedServiceMessageReceiverInOut.java line 343
The method getNamespaceURI() is undefined for the type OMNamespace

Both methods read (BTW: the code is *very* ugly formatted...):

-----------------------
...
/**
* A utility method that copies the namepaces from the SOAPEnvelope
*/
private java.util.Map 
getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
java.util.Map returnMap = new java.util.HashMap();
java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
while (namespaceIterator.hasNext()) {
org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) 
namespaceIterator.next();
returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); // <<<< unknown 
method
}
return returnMap;
}
...
-----------------------

Michael



"Davanum Srinivas" <da...@gmail.com> wrote in message 
news:19e0530f0611151112x724ddb74r176cbf017d9b131f@mail.gmail.com...
> Folks,
>
> Please chime in with your observations:
>
> - Is Axis2 1.1 working for you?
> - Did you find a problem?
> - Is it in JIRA? (What's the JIRA issue #)
>
> based on this feedback, depending on the issues/problems, the dev team
> can decide on whether to cut a quick 1.1.1 off the 1.1 branch and what
> that 1.1.1 should contain as fixes. Otherwise, onwards towards 1.2...
>
> Thanks,
> dims
>
> -- 
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service 
> Developers) 



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


Re: WSDL2Java: generates code with compile error

Posted by Ramesh Gurunathan <ra...@gmail.com>.
Hello Dims,

I dropped jalopy.jar in the classpath but still no effect. Do I need
to do anything more this? Please advice. Thanks

Ramesh


On 11/18/06, Davanum Srinivas <da...@gmail.com> wrote:
> Please open a JIRA bug and upload your wsdl. If you drop jalopy jar in
> your classpath, the code is automatically beautified.
>
> -- dims
>
> On 11/17/06, Michael Moser <mm...@zurich.ibm.com> wrote:
> > And I get similar compile errors on code generated for the client:
> >
> > In the generated code for class ClassifiedServiceStub there are multiple
> > locations that read:
> > -----------------------
> > ...
> > //adding SOAP headers
> > _serviceClient.addHeadersToEnvelope(env); // <<< does not exist
> > ...
> > -----------------------
> >
> > I assume that should read "addHeader(env)" instead.
> >
> > Michael
> >
> >
> >
> > "Michael Moser" <mm...@zurich.ibm.com> wrote in message
> > news:ejkh04$g9p$1@sea.gmane.org...
> > > When running WSDL2Java I am getting two classes on which the compiler
> > > yells:
> > >
> > > ClassifiedServiceMessageReceiverInOnly.java line 296
> > > The method getNamespaceURI() is undefined for the type OMNamespace
> > >
> > > ClassifiedServiceMessageReceiverInOut.java line 343
> > > The method getNamespaceURI() is undefined for the type OMNamespace
> > >
> > > Both methods read (BTW: the code is *very* ugly formatted...):
> > >
> > > -----------------------
> > > ...
> > > /**
> > > * A utility method that copies the namepaces from the SOAPEnvelope
> > > */
> > > private java.util.Map
> > > getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
> > > java.util.Map returnMap = new java.util.HashMap();
> > > java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
> > > while (namespaceIterator.hasNext()) {
> > > org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace)
> > > namespaceIterator.next();
> > > returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); // <<<< unknown
> > > method
> > > }
> > > return returnMap;
> > > }
> > > ...
> > > -----------------------
> > >
> > > Michael
> > >
> > >
> > >
> > > "Davanum Srinivas" <da...@gmail.com> wrote in message
> > > news:19e0530f0611151112x724ddb74r176cbf017d9b131f@mail.gmail.com...
> > >> Folks,
> > >>
> > >> Please chime in with your observations:
> > >>
> > >> - Is Axis2 1.1 working for you?
> > >> - Did you find a problem?
> > >> - Is it in JIRA? (What's the JIRA issue #)
> > >>
> > >> based on this feedback, depending on the issues/problems, the dev
> > >> team
> > >> can decide on whether to cut a quick 1.1.1 off the 1.1 branch and
> > >> what
> > >> that 1.1.1 should contain as fixes. Otherwise, onwards towards 1.2...
> > >>
> > >> Thanks,
> > >> dims
> > >>
> > >> --
> > >> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
> > >> Developers)
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>
> ---------------------------------------------------------------------
> 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: WSDL2Java: generates code with compile error

Posted by Davanum Srinivas <da...@gmail.com>.
Please open a JIRA bug and upload your wsdl. If you drop jalopy jar in
your classpath, the code is automatically beautified.

-- dims

On 11/17/06, Michael Moser <mm...@zurich.ibm.com> wrote:
> And I get similar compile errors on code generated for the client:
>
> In the generated code for class ClassifiedServiceStub there are multiple
> locations that read:
> -----------------------
> ...
> //adding SOAP headers
> _serviceClient.addHeadersToEnvelope(env); // <<< does not exist
> ...
> -----------------------
>
> I assume that should read "addHeader(env)" instead.
>
> Michael
>
>
>
> "Michael Moser" <mm...@zurich.ibm.com> wrote in message
> news:ejkh04$g9p$1@sea.gmane.org...
> > When running WSDL2Java I am getting two classes on which the compiler
> > yells:
> >
> > ClassifiedServiceMessageReceiverInOnly.java line 296
> > The method getNamespaceURI() is undefined for the type OMNamespace
> >
> > ClassifiedServiceMessageReceiverInOut.java line 343
> > The method getNamespaceURI() is undefined for the type OMNamespace
> >
> > Both methods read (BTW: the code is *very* ugly formatted...):
> >
> > -----------------------
> > ...
> > /**
> > * A utility method that copies the namepaces from the SOAPEnvelope
> > */
> > private java.util.Map
> > getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
> > java.util.Map returnMap = new java.util.HashMap();
> > java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
> > while (namespaceIterator.hasNext()) {
> > org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace)
> > namespaceIterator.next();
> > returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); // <<<< unknown
> > method
> > }
> > return returnMap;
> > }
> > ...
> > -----------------------
> >
> > Michael
> >
> >
> >
> > "Davanum Srinivas" <da...@gmail.com> wrote in message
> > news:19e0530f0611151112x724ddb74r176cbf017d9b131f@mail.gmail.com...
> >> Folks,
> >>
> >> Please chime in with your observations:
> >>
> >> - Is Axis2 1.1 working for you?
> >> - Did you find a problem?
> >> - Is it in JIRA? (What's the JIRA issue #)
> >>
> >> based on this feedback, depending on the issues/problems, the dev
> >> team
> >> can decide on whether to cut a quick 1.1.1 off the 1.1 branch and
> >> what
> >> that 1.1.1 should contain as fixes. Otherwise, onwards towards 1.2...
> >>
> >> Thanks,
> >> dims
> >>
> >> --
> >> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service
> >> Developers)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: WSDL2Java: generates code with compile error

Posted by Michael Moser <mm...@zurich.ibm.com>.
And I get similar compile errors on code generated for the client:

In the generated code for class ClassifiedServiceStub there are multiple 
locations that read:
-----------------------
...
//adding SOAP headers
_serviceClient.addHeadersToEnvelope(env); // <<< does not exist
...
-----------------------

I assume that should read "addHeader(env)" instead.

Michael



"Michael Moser" <mm...@zurich.ibm.com> wrote in message 
news:ejkh04$g9p$1@sea.gmane.org...
> When running WSDL2Java I am getting two classes on which the compiler 
> yells:
>
> ClassifiedServiceMessageReceiverInOnly.java line 296
> The method getNamespaceURI() is undefined for the type OMNamespace
>
> ClassifiedServiceMessageReceiverInOut.java line 343
> The method getNamespaceURI() is undefined for the type OMNamespace
>
> Both methods read (BTW: the code is *very* ugly formatted...):
>
> -----------------------
> ...
> /**
> * A utility method that copies the namepaces from the SOAPEnvelope
> */
> private java.util.Map 
> getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
> java.util.Map returnMap = new java.util.HashMap();
> java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
> while (namespaceIterator.hasNext()) {
> org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) 
> namespaceIterator.next();
> returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); // <<<< unknown 
> method
> }
> return returnMap;
> }
> ...
> -----------------------
>
> Michael
>
>
>
> "Davanum Srinivas" <da...@gmail.com> wrote in message 
> news:19e0530f0611151112x724ddb74r176cbf017d9b131f@mail.gmail.com...
>> Folks,
>>
>> Please chime in with your observations:
>>
>> - Is Axis2 1.1 working for you?
>> - Did you find a problem?
>> - Is it in JIRA? (What's the JIRA issue #)
>>
>> based on this feedback, depending on the issues/problems, the dev 
>> team
>> can decide on whether to cut a quick 1.1.1 off the 1.1 branch and 
>> what
>> that 1.1.1 should contain as fixes. Otherwise, onwards towards 1.2...
>>
>> Thanks,
>> dims
>>
>> -- 
>> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service 
>> Developers) 



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


Re: WSDL2Java: generates code with compile error

Posted by Michael Moser <mm...@zurich.ibm.com>.
Sorry - I have to take my last append back - the errors still DO exist 
(and are also regenerated, if one deletes the code and regenerates 
again).
I had been looking using the wrong eclipse "perspective"...

Michael

"Michael Moser" <mm...@zurich.ibm.com> wrote in message 
news:ejkihu$m7e$1@sea.gmane.org...
> Strange - since I tried again (and to verify I tried a few more times) 
> the code generated is now always OK.
> Beats me, what went wrong the first time...
>
> Michael 



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


Re: WSDL2Java: generates code with compile error

Posted by Michael Moser <mm...@zurich.ibm.com>.
Strange - since I tried again (and to verify I tried a few more times) 
the code generated is now always OK.
Beats me, what went wrong the first time...

Michael



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