Re: Error when running WSDL2Ws

2005-08-08 Thread George Sebastian
Hi Tim,

Just try to set the classpath at the command console itself to the jars. Ensure it is set by echoing it on the console.(Do all these with a well structured wsdl)
If you have eclipse(http://eclipse.org) installed then thereis simpleway to do this.
Create a newjava project and then right click and getproperties of project add the jars to classpathGo to the class file WSDL2 opening the jar and then run it with the sufficient program argumnets as a java application.


Sorry to introduce eclipse into picture. i just thought of giving an additional info if you have eclipse installed.

Thanks
George S

On 8/8/05, Dushshantha Chandradasa [EMAIL PROTECTED] wrote:
Hi,I tried to reproduce your problem by moving my jars in to C:\ProgramFiles folder. I just wanted to set the classpath to a folder with a name
which has spaces in between the words.I ended up with the following error.Exception in thread main java.lang.NoClassDefFoundError:Files\AxisClasses\axis-1_2beta\lib\axis/jar;C:\Program
It seems to me that Windows (I'm using XP Professional 2002) cannotresolve the classpath when there are spaces in it.Just try with a classpath which is no spaces.(I assume that your wsdl file contails all the required fields to
generate classesd from the tool)Regards,Dushshantha-Original Message-From: Bish, Tim [mailto:[EMAIL PROTECTED]]Sent: Friday, August 05, 2005 5:14 PM
To: 'Apache AXIS C User List'Subject: RE: Error when running WSDL2WsThis is my classpath, all the JARs specified are there.CLASSPATH=.;C:\Program Files\Java\jaf-1.0.2\activation.jar;C:\ProgramFiles\Axis\lib\axis-
ant.jar;C:\Program Files\Axis\lib\axis.jar;C:\ProgramFiles\Axis\lib\commons-discovery-0.2.jar;C:\ProgramFiles\Axis\lib\commons-logging-1.0.4.jar ;C:\Program Files\Axis\lib\jaxrpc.jar;C:\ProgramFiles\Axis\lib\saaj.jar;C:\Program Files\Axi
s\lib\wsdl4j-1.5.1.jar;C:\Program Files\Java\javamail-1.3.2\mail.jar;When I execute the command like so, this is what I get.C:\Source Archive\AxisCClientjava -classpath.\wsdl2ws.jar;.;%CLASSPATH%
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws SoapTestServer.wsdl -o./ClientOut -lc++ -sclientException in thread main java.lang.NoSuchMethodError:org.apache.axis.wsdl.symbolTable.BindingEntry.getBindi
ngStyle()Lorg/apache/axis/enum/Style; at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(UnknownSource) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(UnknownSource) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers
(UnknownSource) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)Timothy A. Bish[EMAIL PROTECTED]
-Original Message-From: Dushshantha Chandradasa [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 04, 2005 11:59 PMTo: Apache AXIS C User List
Subject: RE: Error when running WSDL2WsDid you set the classpath properly?? Please check whether you have setfollowing jars in your classpath??axis.jarwsdl4j.jarcommons-discovery.jarcommons-logging.jar
log4j-1.2.8.jarjaxrpc.jarsaaj.jarYou should set the classpath in following manner. Note that each of thefiles above should be separately included in the classpath..;C:\AxisClasses\axis-1_2beta\lib\axis.jar;C:\AxisClasses\axis-1_2beta\l
ib\commons-discovery.jar;C:\AxisClasses\axis-1_2beta\lib\commons-logging.jar;C:\AxisClasses\axis-1_2beta\lib\jaxrpc.jar;C:\AxisClasses\axis-1_2beta\lib\saaj.jar;C:\AxisClasses\axis-1_2beta\lib\wsdl4j.jar;C:\AxisClass
es\axis-1_2beta\lib\xml-apis.jarPlease refer http://ws.apache.org/axis/cpp/arch/WSDL2Ws.html for moredetails.Thanks,Dushshantha
-Original Message-From: Bish, Tim [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 04, 2005 7:14 PMTo: 'axis-c-user@ws.apache.org
'Subject: Error when running WSDL2WsUpon running the WSDL2Ws tool I get the following error.Exception in thread main java.lang.NoSuchMethodError:org.apache.axis.wsdl.symbolTable.BindingEntry.getBindi
ngStyle()Lorg/apache/axis/enum/Style; at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(UnknownSource) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(UnknownSource) at 
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(UnknownSource) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)Current Axis-C version is 1.5 and my Java Version is:java version 
1.5.0_04Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)Any clues?
Timothy A. Bish[EMAIL PROTECTED]


RE: Error when running WSDL2Ws

2005-08-08 Thread Bish, Tim
Hi

If you look at my command line call to WSDL2Ws you will see quotes around
the CLASSPATH expansion, this would resolve the problem you saw, I routinely
run programs this way without problems.

C:\Source Archive\AxisCClientjava -classpath .\wsdl2ws.jar;.;%CLASSPATH%
org.apache.axis.wsdl.wsdl2ws.WSDL2

I've moved things around and still no luck.


Timothy A. Bish

-Original Message-
From: Dushshantha Chandradasa [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 08, 2005 12:36 AM
To: Apache AXIS C User List
Subject: RE: Error when running WSDL2Ws

Hi,

I tried to reproduce your problem by moving my jars in to C:\Program
Files folder. I just wanted to set the classpath to a folder with a name
which has spaces in between the words.

I ended up with the following error.

Exception in thread main java.lang.NoClassDefFoundError:
Files\AxisClasses\axi
s-1_2beta\lib\axis/jar;C:\Program

It seems to me that Windows (I'm using XP Professional 2002) cannot
resolve the classpath when there are spaces in it. 

Just try with a classpath which is no spaces.

(I assume that your wsdl file contails all the required fields to
generate classesd from the tool)

Regards,
Dushshantha

-Original Message-
From: Bish, Tim [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 05, 2005 5:14 PM
To: 'Apache AXIS C User List'
Subject: RE: Error when running WSDL2Ws

This is my classpath, all the JARs specified are there.

CLASSPATH=.;C:\Program Files\Java\jaf-1.0.2\activation.jar;C:\Program
Files\Axis\lib\axis-ant.jar;C:\Program F
iles\Axis\lib\axis.jar;C:\Program
Files\Axis\lib\commons-discovery-0.2.jar;C:\Program
Files\Axis\lib\commons-l
ogging-1.0.4.jar ;C:\Program Files\Axis\lib\jaxrpc.jar;C:\Program
Files\Axis\lib\saaj.jar;C:\Program Files\Axi
s\lib\wsdl4j-1.5.1.jar;C:\Program Files\Java\javamail-1.3.2\mail.jar;

When I execute the command like so, this is what I get.

C:\Source Archive\AxisCClientjava -classpath
.\wsdl2ws.jar;.;%CLASSPATH%
org.apache.axis.wsdl.wsdl2ws.WSDL2
Ws SoapTestServer.wsdl -o./ClientOut -lc++ -sclient
Exception in thread main java.lang.NoSuchMethodError:
org.apache.axis.wsdl.symbolTable.BindingEntry.getBindi
ngStyle()Lorg/apache/axis/enum/Style;
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)


Timothy A. Bish
[EMAIL PROTECTED] 

-Original Message-
From: Dushshantha Chandradasa [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 04, 2005 11:59 PM
To: Apache AXIS C User List
Subject: RE: Error when running WSDL2Ws

Did you set the classpath properly?? Please check whether you have set
following jars in your classpath??

axis.jar 
wsdl4j.jar 
commons-discovery.jar 
commons-logging.jar 
log4j-1.2.8.jar 
jaxrpc.jar 
saaj.jar 

You should set the classpath in following manner. Note that each of the
files above should be separately included in the classpath.

.;C:\AxisClasses\axis-1_2beta\lib\axis.jar;C:\AxisClasses\axis-1_2beta\l
ib\commons-discovery.jar;C:\AxisClasses\axis-1_2beta\lib\commons-logging
.jar;C:\AxisClasses\axis-1_2beta\lib\jaxrpc.jar;C:\AxisClasses\axis-1_2b
eta\lib\saaj.jar;C:\AxisClasses\axis-1_2beta\lib\wsdl4j.jar;C:\AxisClass
es\axis-1_2beta\lib\xml-apis.jar


Please refer http://ws.apache.org/axis/cpp/arch/WSDL2Ws.html for more
details. 


Thanks,
Dushshantha

-Original Message-
From: Bish, Tim [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 04, 2005 7:14 PM
To: 'axis-c-user@ws.apache.org'
Subject: Error when running WSDL2Ws

Upon running the WSDL2Ws tool I get the following error.

Exception in thread main java.lang.NoSuchMethodError:
org.apache.axis.wsdl.symbolTable.BindingEntry.getBindi
ngStyle()Lorg/apache/axis/enum/Style;
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
Source)
at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)

Current Axis-C version is 1.5 and my Java Version is:

java version 1.5.0_04
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

Any clues?


Timothy A. Bish
[EMAIL PROTECTED] 


Re: Problem deserializing SOAP response in Axis C++ client

2005-08-08 Thread Samisa Abeysinghe
We seem to have a problem with encoding.
There are few Jira issues on this.

We got to look into XML encoding to solve this problem.

Samisa...

On 8/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
 OK, I think I see my mistake. The SOAP response sent by the webservice has
 character entities (lt; and gt;) instead ofin its xml tags. 
   
 Thus the line 
 result xsi:type=xsd:stringTEST/result 
   
 is actually -  
 lt;result xsi:type=xsd:stringgt;TESTlt;/resultgt; 
   
 SOAP Response from webservice 
 env:Envelope
 xmlns:env = http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsi = http://www.w3.org/2001/XMLSchema-instance;
 xmlns:soapenc =
 http://schemas.xmlsoap.org/soap/encoding/;
 xmlns:xsd = http://www.w3.org/2001/XMLSchema;
 env:Body
 n1:lookupProductResponse xmlns:n1 =
 http://www.cardinal.com/distribution/webservices;lt;result
 xsi:type=xsd:stringgt;TESTlt;/resultgt;/n1:lookupProductResponse
 /env:Body
 /env:Envelope
  
   
 Any idea how to enable parsing of character entity tags as xml nodes in Axis
 C++ (actually xerces 2.6) client? 
   
 There is a function setCreateEntityReferenceNodes(bool)
 mentioned axis docs
 (%AXIS_EXTRACT%/xerces-c_2_6_0-windows_nt-msvc_60/doc/html/apiDocs/classAbstractDOMParser.html#z452_5),
 can this be used in this case? 
   
   
 Thanks, 
   
 Linesh 
   
 
  
  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 05, 2005 3:20 PM
 To: axis-c-user@ws.apache.org
 Subject: RE: Problem deserializing SOAP response in Axis C++ client
 
  
  
 Hi Dushshantha, 
   
 Please find the attached wsdl. 
   
 When debugged AxisXmlParserXerces code with a xerces-c_2_6D.dll, it stopped
 throwing exception like xerces-c_2_2_0.dll (the dll which I was using
 earlier). However, getElementAsString() is now returning 0 value after
 deserializing result xsi:type=xsd:stringTEST/result. 
   
 Some pointers - 
   
 In getElementAsString() function,  getXSDType() (SoapDeSerializer.cpp: line
 # 3110) returns XSD_UNKNOWN. This ultimately results in returning 0 from
 getElementString (instead of TEST). 
   
 At line # 3106 in SoapDeSerializer.cpp (m_pNode = m_pParser-next ()) the
 m_type of node pointer shows END_ELEMENT instead of expected START_ELEMENT.
 This results in returning type as XSD_UNKNOWN. 
   
 Also, for some reason pElement-m_pchAttributes array also shows up empty in
 getXSDType() function. 
   
   
 This seems to be a bug. If so, is there any work already done on it? 
   
   
 Thanks  regards, 
   
 Linesh 
 
 
  
  
  From: Dushshantha Chandradasa [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 05, 2005 1:08 PM
 To: Apache AXIS C User List
 Subject: RE: Problem deserializing SOAP response in Axis C++ client
 
  
  
  
 
 Hi Linesh, 
 
   
 
 It would be better if you can attach the wsdl file you are using for that
 then I can generate the client and test with MockServer. 
 
 And you can use MockServer for Client side testing. Please refer to
 ..\ws-axis\c\tests\auto_build\UnitTest_Readme.txt for more
 information. 
 
   
 
 Thanks, 
 
 Dushshantha 
  
  
  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 05, 2005 10:23 AM
 To: axis-c-user@ws.apache.org
 Subject: Problem deserializing SOAP response in Axis C++ client 
 
   
  
  
 
 Hi, 
  
 
   
  
 
 I am trying to communicate with a J2EE webservice running on Bea Weblogic
 webserver 8.1 SP3. The client side has Axis C++. I am getting error while
 reading the SOAP response sent by the webservice. The exception occurs on
 calling getElementAsString function (after checkMessage return successful,
 line 3105: at m_pNode = m_pParser-next ()). 
  
 
   
  
 
 The code is exactly similar to the one provided with C++ samples. 
  
  
 
  if (AXIS_SUCCESS != m_pCall-initialize(CPP_RPC_PROVIDER))
return *Ret; 
  
 
  if
 (NULL==m_pCall-getTransportProperty(SOAPAction,false))
  {
   m_pCall-setTransportProperty(SOAPACTION_HEADER ,
 ProductLookupService#lookupProduct);
  }
   m_pCall-setSOAPVersion(SOAP_VER_1_1); 
  
 
   
  
 
  setUsername(user);
  setPassword(password); 
  
 
   
  
 
  m_pCall-setOperation(lookupProduct,
 http://localhost/distribution/webservices;);
   
  applyUserPreferences();
  m_pCall-addParameter((void*)lpParam, xmlRequest,
 XSD_STRING);
   
  if (AXIS_SUCCESS == m_pCall-invoke()) 
  
 
  { 
  
 
 
  
 
 if(AXIS_SUCCESS==m_pCall-checkMessage(lookupProductResponse,
 http://www.cardinal.com/distribution/webservices;))
 {
  char sTemp[1024]=;
  sprintf(sTemp, m_pCall-getElementAsString(result, 0));//
 EXCEPTION THROWN HERE***
 }
   
  
 
 The response received is as below (Trapped using Mindreef SOAPScope). 
  
 
   
  
 
 Request sent (It sends an XML string in parameter xmlRequest) - 
  
  
 
 ?xml version='1.0' encoding='utf-8' ?
 SOAP-ENV:Envelope
 xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;