[Axis2C] Support for C++ and Project Roadmap

2006-05-16 Thread Rodrigo Ruiz

Hi all,

Is there any roadmap on the project web? I would like to know what 
functionalities are planned to be developed and which ones have priority 
over others.


Does anybody know whether C++ support is going to be added in Axis2/C 
someday, or it is expected to be implemented in a separate project?


Thanks in advance,
Rodrigo Ruiz

--
---
GRIDSYSTEMSRodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorcamailto:[EMAIL PROTECTED]
Baleares - España  Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
---


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/05/2006



RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Adrian Dick
Hi,

As we've now excluded the illegal use of '', it could be related to how
the SOAP message is being received, I know of some bugs fixed in 1.6 which
could cause similar problems to those you describe.
Is it possible for you to attach the on-the-wire SOAP/HTTP message
causing this problem?

Thanks,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 16:41:16:

 Hm, sorry I didn't make this clear enough: when looking at the data over
 the wire, the ampersand is escaped correctly.
 The webservice is deployed with axis-java, so no problems there. My
 example should read nameBOOT amp; BUTEIJN/name.
 The amp; was already resolved by xerces when I copy/pasted the value to
 this e-mail, sorry for the confusion.

 So Xerces parser has no problems at all, but there seems to be a bug in
 the XercesHandler implementation in Axis.
 Btw, I have the problem with both Xerces 2.2.0 (as included in axis 1.5
 release), and also when I build Axis 1.5 myself linked with Xerces
 2.7.0.

 I have not been able to use the 1.6 nightly build yet, and I would
 rather be able to quickly fix the production problem with a 1.5 patch
 first.

 Regards,
 Iwan

 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: maandag 15 mei 2006 17:20
 To: Apache AXIS C User List
 Subject: Re: Crash in XercesHandler.cpp with  in response

 Hi,


 Under the SOAP (and underlying XML) standards the ampersand character is
 reserved, so you are not permitted to use it within data.
 You will need to ensure any occurances are correctly encoded   --- ie:
 ''
 becomes amp;.

 It looks quite likely the Xerces Parser is failing when it hits this
 invalid use of ''.

 How is this XML data being produced?   Are you using xsd:any -- in which
 case you'll need to ensure this encoding takes place -- or are you
 seeing an error in the Axis serialization code, where this should be
 taking place on your behalf.

 Are you in a position to test if this problem is still present with the
 latest Axis 1.6 nightly builds?

 Regards,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 13:34:04:

  Hi all,
 
  I'm using the Axis C++ 1.5 in a production project, and we are
  experiencing problems when the response from the webservice contains
  ampersands in the xml-data, like nameBOOT  BUTEIJN/name.
 
  The generated Axis-client stub crashes (with 'Invalid Address
  specified to RtlFreeHeap' in MCVC6.0 debugger) on the following code
  in XercesHandler::characters
 free(const_cast char* (cp_PreviousNameOrValue));
 free(cp_CurrentNameOrValue);
 
  I found a jira-issue (AXISCPP-825) that seems to address this issue,
  but the reported fix (change free to delete[]) does not work for me,
  the result is the same.
 
  Does anyone have this issue, any hints?
  Strange thing: it appears everything works fine if a point my
  XMLParser in axiscpp.conf to the debug-library 'AxisXMLParser_D.dll'
  instead of the release-build, but I'm afraid that is just a
 coincidence.
 
  Any help appreciated.
 
  Kind regards,
  Iwan Tomlow




Re: [Axis2C] Support for C++ and Project Roadmap

2006-05-16 Thread Samisa Abeysinghe

Rodrigo Ruiz wrote:


Hi all,

Is there any roadmap on the project web? I would like to know what 
functionalities are planned to be developed and which ones have 
priority over others.


We have some indication on the road map on our main web site.
Please have a look at Un-Implemented Architecture Features (TBD in 
1.0) and Un-Implemented Architecture Features (TBD post 1.0) sections 
on the web page.


However, we do not have priorities defined as of now. May be we should 
do this in the Wiki site.




Does anybody know whether C++ support is going to be added in Axis2/C 
someday, or it is expected to be implemented in a separate project?


No C++ support is planned as of now. However one could wrap with ease, 
as the base API is in C.


Thanks,
Samisa...



Thanks in advance,
Rodrigo Ruiz





RE: AxisEngineException

2006-05-16 Thread Adrian Dick
Hi,

I'm surprised you're having problems using the same stub twice.  We have
numerous testcases which re-use the same stub object, including mixed
operations.

Looking at the trace, it would appear the second call didn't receive the
expected SOAP message.

Can you use TCPmon, or similiar, to capture the on-the-wire messages when
making these two subsequent calls?
A copy of your WSDL would also be helpful, so we can ensure the correct
names and values are being used throughout.

Regards,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Cheng, John [EMAIL PROTECTED] wrote on 15/05/2006 16:26:36:

 Adrian,

 Thanks for the help! I found the problem after enable the trace. It was
 due to my searching path did not include the directory where
 AxisXMLParserXerces.dll is located. My testing sample is working now.
 But I found another interesting problem with the library, though. I have
 a piece of code looks like this:

   ServiceSoap
 s(http://localhost/WebService1/service.asmx;);
   xsd__string str = s.HelloWorld();
   int x = s.Add(12, 24);

 My experience with other web service client code told me the two
 sequential calls should work. But it's not working here. Only the first
 call works. The second one will give an AxisGenException. After I switch
 my calling sequence, it's the same. The second one doesn't work. Why is
 there such limitation? I attached my log file this time.

 Thanks!

 John Cheng


 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 10, 2006 3:06 AM
 To: Apache AXIS C User List
 Subject: Re: AxisEngineException

 Hi,

 Have you tried turning on trace?  ( See
 http://ws.apache.org/axis/cpp/TraceGuide.html#enablingRuntimeTrace and
 possibly also
 http://ws.apache.org/axis/cpp/TraceGuide.html#enablingStartupTrace )
 This may give you some pointers to the problem, if there's nothing
 obvious
 you can post your tracefile here so we can look for any problems.

 As for project files, see my response to another recent question here:
 http://marc.theaimsgroup.com/?l=axis-c-userm=114724798004149w=2

 Regards,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Cheng, John [EMAIL PROTECTED] wrote on 09/05/2006 19:10:32:

  Hi,
  I am having a problem to make a C++ app to call a .NET C# web
  service, using Axis C++. The service was implemented and tested
  separately. I generated the client side code using WSDL2Ws and
  included it with my application (on windows platform). But when
  running the application I get AxisEngineException while
  instantiating the generated class. There is no other information,
  and I could not figure it out base on the document. I also tried to
 compile
  the distributed project vc\Distribution.sln and vc\AxisDevelopment.
  sln, hope to get a debug version of axis_client.lib. But it
  complains some files can not be found, for example:
  src\common\AxisException.cpp is not in the package. Any help?
  Thanks!
  John Cheng
 [attachment AxisClientLog.my.zip deleted by Adrian Dick/UK/IBM]



RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Iwan Tomlow
Sure, this is the on-the-wire message (in which I had to replace some
personal data for confidentiality).
The amp; in employerName causes XercesHandler to parse the data in 2
steps, and the 2nd call to XercesHandler::characters is causing problems
in the use of 'cp_PreviousNameOrValue'.

Thanks for your assistance,
Iwan

?xml version=1.0 encoding=UTF-8?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
soapenv:Body
getCardResponse xmlns=http://thenamespace;
getCardReturn
cardNumber12345/cardNumber
cardState104/cardState
cardValidTo03/11/2008/cardValidTo
cardVersion0/cardVersion
customerCode0/customerCode
dateOfBirth01/01/1975/dateOfBirth
employerCitySOMEWHERE/employerCity
employerCountryXX/employerCountryemployerNameBOOT amp;
BUTEIJN/employerName
employerNumber1234/employerNumberemployerPhone/999.999.999/em
ployerPhone
employerStreetTHERE/employerStreet
employerZipAA/employerZip
firstNameFIRST/firstName
groupNumber1/groupNumber
homeAddressCityCITY/homeAddressCity
homeAddressCountryXX/homeAddressCountry
homeAddressStreetSTREET 11/homeAddressStreet
homeAddressZipAA/homeAddressZip
homePhone xsi:nil=true/
lastNameLAST/lastName
nationalityXX/nationality
personnelNumber/personnelNumber
qualification1 xsi:nil=true/qualification2
xsi:nil=true/qualification3 xsi:nil=true/subgroupNumber
xsi:nil=true/
/getCardReturn
/getCardResponse
/soapenv:Body
/soapenv:Envelope 

-Original Message-
From: Adrian Dick [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 16 mei 2006 10:21
To: Apache AXIS C User List
Subject: RE: Crash in XercesHandler.cpp with  in response

Hi,

As we've now excluded the illegal use of '', it could be related to how
the SOAP message is being received, I know of some bugs fixed in 1.6
which could cause similar problems to those you describe.
Is it possible for you to attach the on-the-wire SOAP/HTTP message
causing this problem?

Thanks,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 16:41:16:

 Hm, sorry I didn't make this clear enough: when looking at the data 
 over the wire, the ampersand is escaped correctly.
 The webservice is deployed with axis-java, so no problems there. My 
 example should read nameBOOT amp; BUTEIJN/name.
 The amp; was already resolved by xerces when I copy/pasted the value 
 to this e-mail, sorry for the confusion.

 So Xerces parser has no problems at all, but there seems to be a bug 
 in the XercesHandler implementation in Axis.
 Btw, I have the problem with both Xerces 2.2.0 (as included in axis 
 1.5 release), and also when I build Axis 1.5 myself linked with Xerces

 2.7.0.

 I have not been able to use the 1.6 nightly build yet, and I would 
 rather be able to quickly fix the production problem with a 1.5 patch 
 first.

 Regards,
 Iwan

 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: maandag 15 mei 2006 17:20
 To: Apache AXIS C User List
 Subject: Re: Crash in XercesHandler.cpp with  in response

 Hi,


 Under the SOAP (and underlying XML) standards the ampersand character 
 is reserved, so you are not permitted to use it within data.
 You will need to ensure any occurances are correctly encoded   --- ie:
 ''
 becomes amp;.

 It looks quite likely the Xerces Parser is failing when it hits this 
 invalid use of ''.

 How is this XML data being produced?   Are you using xsd:any -- in
which
 case you'll need to ensure this encoding takes place -- or are you 
 seeing an error in the Axis serialization code, where this should be 
 taking place on your behalf.

 Are you in a position to test if this problem is still present with 
 the latest Axis 1.6 nightly builds?

 Regards,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 13:34:04:

  Hi all,
 
  I'm using the Axis C++ 1.5 in a production project, and we are 
  experiencing problems when the response from the webservice contains

  ampersands in the xml-data, like nameBOOT  BUTEIJN/name.
 
  The generated Axis-client stub crashes (with 'Invalid Address 
  specified to RtlFreeHeap' in MCVC6.0 debugger) on the following code

  in XercesHandler::characters
 free(const_cast char* (cp_PreviousNameOrValue));
 free(cp_CurrentNameOrValue);
 
  I found a jira-issue (AXISCPP-825) that seems to address this issue,

  but the reported fix (change free to delete[]) does not work for me,

  the result is the same.
 
  Does anyone have this issue, any hints?
  Strange thing: it appears everything works fine if a point my 
  XMLParser in axiscpp.conf to the debug-library 'AxisXMLParser_D.dll'
  instead of the release-build, but I'm afraid that is just a
 coincidence.
 
  Any help appreciated.
 
  Kind regards,
  Iwan Tomlow




RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Adrian Dick
Hi,

Ok, I can't see anything obviously wrong with your SOAP message ... I
wouldn't expect the amp; to cause problems, as we have a passing testcase
to check the correct encoding/decoding of this, and looking through the SVN
history the code which handles encoding/decoding hasn't been touched since
before the release of 1.5.

I'm wondering if perhaps you're hitting a problem with the transport/parser
interaction.
I should have asked before, can you also include the HTTP headers, etc. so
I can check if there are any content/chunk length issues here.

Regards,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 16/05/2006 10:01:03:

 Sure, this is the on-the-wire message (in which I had to replace some
 personal data for confidentiality).
 The amp; in employerName causes XercesHandler to parse the data in 2
 steps, and the 2nd call to XercesHandler::characters is causing problems
 in the use of 'cp_PreviousNameOrValue'.

 Thanks for your assistance,
 Iwan

 ?xml version=1.0 encoding=UTF-8?
 soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
 getCardResponse xmlns=http://thenamespace;
 getCardReturn
 cardNumber12345/cardNumber
 cardState104/cardState
 cardValidTo03/11/2008/cardValidTo
 cardVersion0/cardVersion
 customerCode0/customerCode
 dateOfBirth01/01/1975/dateOfBirth
 employerCitySOMEWHERE/employerCity
 employerCountryXX/employerCountryemployerNameBOOT amp;
 BUTEIJN/employerName
 employerNumber1234/employerNumberemployerPhone/999.999.999/em
 ployerPhone
 employerStreetTHERE/employerStreet
 employerZipAA/employerZip
 firstNameFIRST/firstName
 groupNumber1/groupNumber
 homeAddressCityCITY/homeAddressCity
 homeAddressCountryXX/homeAddressCountry
 homeAddressStreetSTREET 11/homeAddressStreet
 homeAddressZipAA/homeAddressZip
 homePhone xsi:nil=true/
 lastNameLAST/lastName
 nationalityXX/nationality
 personnelNumber/personnelNumber
 qualification1 xsi:nil=true/qualification2
 xsi:nil=true/qualification3 xsi:nil=true/subgroupNumber
 xsi:nil=true/
 /getCardReturn
 /getCardResponse
 /soapenv:Body
 /soapenv:Envelope

 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 16 mei 2006 10:21
 To: Apache AXIS C User List
 Subject: RE: Crash in XercesHandler.cpp with  in response

 Hi,

 As we've now excluded the illegal use of '', it could be related to how
 the SOAP message is being received, I know of some bugs fixed in 1.6
 which could cause similar problems to those you describe.
 Is it possible for you to attach the on-the-wire SOAP/HTTP message
 causing this problem?

 Thanks,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 16:41:16:

  Hm, sorry I didn't make this clear enough: when looking at the data
  over the wire, the ampersand is escaped correctly.
  The webservice is deployed with axis-java, so no problems there. My
  example should read nameBOOT amp; BUTEIJN/name.
  The amp; was already resolved by xerces when I copy/pasted the value
  to this e-mail, sorry for the confusion.
 
  So Xerces parser has no problems at all, but there seems to be a bug
  in the XercesHandler implementation in Axis.
  Btw, I have the problem with both Xerces 2.2.0 (as included in axis
  1.5 release), and also when I build Axis 1.5 myself linked with Xerces

  2.7.0.
 
  I have not been able to use the 1.6 nightly build yet, and I would
  rather be able to quickly fix the production problem with a 1.5 patch
  first.
 
  Regards,
  Iwan
 
  -Original Message-
  From: Adrian Dick [mailto:[EMAIL PROTECTED]
  Sent: maandag 15 mei 2006 17:20
  To: Apache AXIS C User List
  Subject: Re: Crash in XercesHandler.cpp with  in response
 
  Hi,
 
 
  Under the SOAP (and underlying XML) standards the ampersand character
  is reserved, so you are not permitted to use it within data.
  You will need to ensure any occurances are correctly encoded   --- ie:
  ''
  becomes amp;.
 
  It looks quite likely the Xerces Parser is failing when it hits this
  invalid use of ''.
 
  How is this XML data being produced?   Are you using xsd:any -- in
 which
  case you'll need to ensure this encoding takes place -- or are you
  seeing an error in the Axis serialization code, where this should be
  taking place on your behalf.
 
  Are you in a position to test if this problem is still present with
  the latest Axis 1.6 nightly builds?
 
  Regards,
  Adrian
  ___
  Adrian Dick ([EMAIL PROTECTED])
 
 
  Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 13:34:04:
 
   Hi all,
  
   I'm using the Axis C++ 1.5 in a production project, and we are
   experiencing problems when the response from the webservice contains

   ampersands in the xml-data, like nameBOOT  BUTEIJN/name.
  
   

RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Iwan Tomlow
Ah, that's more difficult, since the webservice is only made available
over HTTPS, so I can't just drop tcpmon in between.
The xml-data is actually taken from the log the server has written just
before posting the reply.

I really think it's more of a memory issue as described in AXISCPP-825,
but that fix alone doesn't seem enough.
I've been experimenting some more, and it doesn't always crash: in debug
mode it works fine most of the time; on Windows XP the release mode
crashes sometimes; on Windows 2000 however, the release version crashes
consistently - and the production client-app must run on a Windows 2000
touchscreen terminal :(

Regards,
Iwan

-Original Message-
From: Adrian Dick [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 16 mei 2006 14:55
To: Apache AXIS C User List
Subject: RE: Crash in XercesHandler.cpp with  in response

Hi,

Ok, I can't see anything obviously wrong with your SOAP message ... I
wouldn't expect the amp; to cause problems, as we have a passing
testcase to check the correct encoding/decoding of this, and looking
through the SVN history the code which handles encoding/decoding hasn't
been touched since before the release of 1.5.

I'm wondering if perhaps you're hitting a problem with the
transport/parser interaction.
I should have asked before, can you also include the HTTP headers, etc.
so I can check if there are any content/chunk length issues here.

Regards,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 16/05/2006 10:01:03:

 Sure, this is the on-the-wire message (in which I had to replace some 
 personal data for confidentiality).
 The amp; in employerName causes XercesHandler to parse the data in 
 2 steps, and the 2nd call to XercesHandler::characters is causing 
 problems in the use of 'cp_PreviousNameOrValue'.

 Thanks for your assistance,
 Iwan

 ?xml version=1.0 encoding=UTF-8? soapenv:Envelope 
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
 getCardResponse xmlns=http://thenamespace; getCardReturn 
 cardNumber12345/cardNumber cardState104/cardState 
 cardValidTo03/11/2008/cardValidTo
 cardVersion0/cardVersion
 customerCode0/customerCode
 dateOfBirth01/01/1975/dateOfBirth
 employerCitySOMEWHERE/employerCity
 employerCountryXX/employerCountryemployerNameBOOT amp; 
 BUTEIJN/employerName 
 employerNumber1234/employerNumberemployerPhone/999.999.999/
 em
 ployerPhone
 employerStreetTHERE/employerStreet
 employerZipAA/employerZip
 firstNameFIRST/firstName
 groupNumber1/groupNumber
 homeAddressCityCITY/homeAddressCity
 homeAddressCountryXX/homeAddressCountry
 homeAddressStreetSTREET 11/homeAddressStreet 
 homeAddressZipAA/homeAddressZip
 homePhone xsi:nil=true/
 lastNameLAST/lastName
 nationalityXX/nationality
 personnelNumber/personnelNumber
 qualification1 xsi:nil=true/qualification2
 xsi:nil=true/qualification3 xsi:nil=true/subgroupNumber 
 xsi:nil=true/ /getCardReturn /getCardResponse /soapenv:Body 
 /soapenv:Envelope

 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 16 mei 2006 10:21
 To: Apache AXIS C User List
 Subject: RE: Crash in XercesHandler.cpp with  in response

 Hi,

 As we've now excluded the illegal use of '', it could be related to 
 how the SOAP message is being received, I know of some bugs fixed in 
 1.6 which could cause similar problems to those you describe.
 Is it possible for you to attach the on-the-wire SOAP/HTTP message 
 causing this problem?

 Thanks,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Iwan Tomlow [EMAIL PROTECTED] wrote on 15/05/2006 16:41:16:

  Hm, sorry I didn't make this clear enough: when looking at the data 
  over the wire, the ampersand is escaped correctly.
  The webservice is deployed with axis-java, so no problems there. My 
  example should read nameBOOT amp; BUTEIJN/name.
  The amp; was already resolved by xerces when I copy/pasted the 
  value to this e-mail, sorry for the confusion.
 
  So Xerces parser has no problems at all, but there seems to be a bug

  in the XercesHandler implementation in Axis.
  Btw, I have the problem with both Xerces 2.2.0 (as included in axis
  1.5 release), and also when I build Axis 1.5 myself linked with 
  Xerces

  2.7.0.
 
  I have not been able to use the 1.6 nightly build yet, and I would 
  rather be able to quickly fix the production problem with a 1.5 
  patch first.
 
  Regards,
  Iwan
 
  -Original Message-
  From: Adrian Dick [mailto:[EMAIL PROTECTED]
  Sent: maandag 15 mei 2006 17:20
  To: Apache AXIS C User List
  Subject: Re: Crash in XercesHandler.cpp with  in response
 
  Hi,
 
 
  Under the SOAP (and underlying XML) standards the ampersand 
  character is reserved, so you are not permitted to use it within
data.
  You will need to ensure any occurances are correctly encoded 

RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Iwan Tomlow
Hi all,

Just letting you know I think the problem is solved!
I was trying to get the 1.6 nightly build to work, but kept running into
other problems.

However, I took a glance at the XercesHandler.cpp included in the 1.6,
and it seems the part that was causing me problems has been changed
significantly (more then described in AXISCPP-825).

I applied this change to my 1.5 sources, rebuild AxisXmlParser.xml, and
don't get the crash anymore on any machine!
Just for reference, the code for the 'PreviousNameOrValue' case in
XercesHandler::characters was changed to:

// The following code is necessary as it is important to get the correct
heap
// (i.e the one that XMLString is using!) when creating a memory object
to put
// back into 'm_pNextElement-m_pchNameOrValue'.  By using the XMLString
// function, we can ensure that only the memory belonging to (and thus
able to
// destroy) the same segment as XMLString is used.  If you don't
understand
// what is going on, don't change it!
if (cp_PreviousNameOrValue)
{
// Get a pointer to the transcoded character.
char *  pTransChar = XMLString::transcode( chars);
// Create a dummy string and populate.
char *  psDummy = new char[ strlen(
m_pNextElement-m_pchNameOrValue) +

strlen( pTransChar) + 1];
strcpy( psDummy, m_pNextElement-m_pchNameOrValue);
strcat( psDummy, pTransChar);
// Create pointer to new Name or Value string.
char *  pNewNameOrValue = XMLString::replicate(
psDummy);
// Delete the old Name and Value string.
XMLString::release( const_castchar**
((m_pCurrElement-m_pchNameOrValue)));
// Assign the new value of Name or Value string.
m_pNextElement-m_pchNameOrValue = pNewNameOrValue;
// Clean up.
delete [] psDummy;
XMLString::release( pTransChar);
}
 
Regards,
Iwan

-Original Message-
From: Iwan Tomlow [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 16 mei 2006 15:13
To: Apache AXIS C User List
Subject: RE: Crash in XercesHandler.cpp with  in response

Ah, that's more difficult, since the webservice is only made available
over HTTPS, so I can't just drop tcpmon in between.
The xml-data is actually taken from the log the server has written just
before posting the reply.

I really think it's more of a memory issue as described in AXISCPP-825,
but that fix alone doesn't seem enough.
I've been experimenting some more, and it doesn't always crash: in debug
mode it works fine most of the time; on Windows XP the release mode
crashes sometimes; on Windows 2000 however, the release version crashes
consistently - and the production client-app must run on a Windows 2000
touchscreen terminal :(

Regards,
Iwan

-Original Message-
From: Adrian Dick [mailto:[EMAIL PROTECTED]
Sent: dinsdag 16 mei 2006 14:55
To: Apache AXIS C User List
Subject: RE: Crash in XercesHandler.cpp with  in response

Hi,

Ok, I can't see anything obviously wrong with your SOAP message ... I
wouldn't expect the amp; to cause problems, as we have a passing
testcase to check the correct encoding/decoding of this, and looking
through the SVN history the code which handles encoding/decoding hasn't
been touched since before the release of 1.5.

I'm wondering if perhaps you're hitting a problem with the
transport/parser interaction.
I should have asked before, can you also include the HTTP headers, etc.
so I can check if there are any content/chunk length issues here.

Regards,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 16/05/2006 10:01:03:

 Sure, this is the on-the-wire message (in which I had to replace some 
 personal data for confidentiality).
 The amp; in employerName causes XercesHandler to parse the data in
 2 steps, and the 2nd call to XercesHandler::characters is causing 
 problems in the use of 'cp_PreviousNameOrValue'.

 Thanks for your assistance,
 Iwan

 ?xml version=1.0 encoding=UTF-8? soapenv:Envelope 
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
 getCardResponse xmlns=http://thenamespace; getCardReturn 
 cardNumber12345/cardNumber cardState104/cardState 
 cardValidTo03/11/2008/cardValidTo
 cardVersion0/cardVersion
 customerCode0/customerCode
 dateOfBirth01/01/1975/dateOfBirth
 employerCitySOMEWHERE/employerCity
 employerCountryXX/employerCountryemployerNameBOOT amp; 
 BUTEIJN/employerName 
 employerNumber1234/employerNumberemployerPhone/999.999.999/
 em
 ployerPhone
 employerStreetTHERE/employerStreet
 employerZipAA/employerZip
 firstNameFIRST/firstName
 groupNumber1/groupNumber
 homeAddressCityCITY/homeAddressCity
 homeAddressCountryXX/homeAddressCountry
 homeAddressStreetSTREET 11/homeAddressStreet 
 

RE: Crash in XercesHandler.cpp with in response

2006-05-16 Thread Adrian Dick
Excellent news!!!


When the final release becomes available in the next few days, you may wish
to consider upgrading to Axis C++ 1.6 , as a number of memory issues (like
this one) and leaks have been resolved since 1.5.

Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Iwan Tomlow [EMAIL PROTECTED] wrote on 16/05/2006 15:28:12:

 Hi all,

 Just letting you know I think the problem is solved!
 I was trying to get the 1.6 nightly build to work, but kept running into
 other problems.

 However, I took a glance at the XercesHandler.cpp included in the 1.6,
 and it seems the part that was causing me problems has been changed
 significantly (more then described in AXISCPP-825).

 I applied this change to my 1.5 sources, rebuild AxisXmlParser.xml, and
 don't get the crash anymore on any machine!
 Just for reference, the code for the 'PreviousNameOrValue' case in
 XercesHandler::characters was changed to:

 // The following code is necessary as it is important to get the correct
 heap
 // (i.e the one that XMLString is using!) when creating a memory object
 to put
 // back into 'm_pNextElement-m_pchNameOrValue'.  By using the XMLString
 // function, we can ensure that only the memory belonging to (and thus
 able to
 // destroy) the same segment as XMLString is used.  If you don't
 understand
 // what is going on, don't change it!
 if (cp_PreviousNameOrValue)
 {
   // Get a pointer to the transcoded character.
   char *   pTransChar = XMLString::transcode( chars);
   // Create a dummy string and populate.
   char *   psDummy = new char[ strlen(
 m_pNextElement-m_pchNameOrValue) +

 strlen( pTransChar) + 1];
   strcpy( psDummy, m_pNextElement-m_pchNameOrValue);
   strcat( psDummy, pTransChar);
   // Create pointer to new Name or Value string.
   char *   pNewNameOrValue = XMLString::replicate(
 psDummy);
   // Delete the old Name and Value string.
   XMLString::release( const_castchar**
 ((m_pCurrElement-m_pchNameOrValue)));
   // Assign the new value of Name or Value string.
   m_pNextElement-m_pchNameOrValue = pNewNameOrValue;
   // Clean up.
   delete [] psDummy;
   XMLString::release( pTransChar);
 }

 Regards,
 Iwan

 -Original Message-
 From: Iwan Tomlow [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 16 mei 2006 15:13
 To: Apache AXIS C User List
 Subject: RE: Crash in XercesHandler.cpp with  in response

 Ah, that's more difficult, since the webservice is only made available
 over HTTPS, so I can't just drop tcpmon in between.
 The xml-data is actually taken from the log the server has written just
 before posting the reply.

 I really think it's more of a memory issue as described in AXISCPP-825,
 but that fix alone doesn't seem enough.
 I've been experimenting some more, and it doesn't always crash: in debug
 mode it works fine most of the time; on Windows XP the release mode
 crashes sometimes; on Windows 2000 however, the release version crashes
 consistently - and the production client-app must run on a Windows 2000
 touchscreen terminal :(

 Regards,
 Iwan

 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: dinsdag 16 mei 2006 14:55
 To: Apache AXIS C User List
 Subject: RE: Crash in XercesHandler.cpp with  in response

 Hi,

 Ok, I can't see anything obviously wrong with your SOAP message ... I
 wouldn't expect the amp; to cause problems, as we have a passing
 testcase to check the correct encoding/decoding of this, and looking
 through the SVN history the code which handles encoding/decoding hasn't
 been touched since before the release of 1.5.

 I'm wondering if perhaps you're hitting a problem with the
 transport/parser interaction.
 I should have asked before, can you also include the HTTP headers, etc.
 so I can check if there are any content/chunk length issues here.

 Regards,
 Adrian
 ___
 Adrian Dick ([EMAIL PROTECTED])


 Iwan Tomlow [EMAIL PROTECTED] wrote on 16/05/2006 10:01:03:

  Sure, this is the on-the-wire message (in which I had to replace some
  personal data for confidentiality).
  The amp; in employerName causes XercesHandler to parse the data in
  2 steps, and the 2nd call to XercesHandler::characters is causing
  problems in the use of 'cp_PreviousNameOrValue'.
 
  Thanks for your assistance,
  Iwan
 
  ?xml version=1.0 encoding=UTF-8? soapenv:Envelope
  xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
  getCardResponse xmlns=http://thenamespace; getCardReturn
  cardNumber12345/cardNumber cardState104/cardState
  cardValidTo03/11/2008/cardValidTo
  cardVersion0/cardVersion
  customerCode0/customerCode
  dateOfBirth01/01/1975/dateOfBirth
  employerCitySOMEWHERE/employerCity
  employerCountryXX/employerCountryemployerNameBOOT amp;
  BUTEIJN/employerName
  

RE: AxisEngineException

2006-05-16 Thread Cheng, John
Adrian,

I got the soap message that exchanged for two function calls (see
below). I think the soapaction in the http header for the second
function always uses the previous functions soapacton. 

I also attached my wsdl file. Thanks!

John Cheng

==

For s.HelloWorld();

Send:

- HTTPHeaders
  hostlocalhost:8080/host 
  content-typetext/xml; charset=UTF-8/content-type 
  soapactionhttp://tempuri.org/HelloWorld;/soapaction 
  content-length340/content-length 
  /HTTPHeaders
  
  ?xml version=1.0 encoding=utf-8 ? 
- SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
- SOAP-ENV:Body
  ns1:HelloWorld xmlns:ns1=http://tempuri.org/; / 
  /SOAP-ENV:Body
  /SOAP-ENV:Envelope


  
Return:

- HTTPHeaders
  serverMicrosoft-IIS/5.1/server 
  dateTue, 16 May 2006 20:20:54 GMT/date 
  x-powered-byASP.NET/x-powered-by 
  x-aspnet-version2.0.50727/x-aspnet-version 
  cache-controlprivate, max-age=0/cache-control 
  content-typetext/xml; charset=utf-8/content-type 
  content-length363/content-length 
  /HTTPHeaders
  
  ?xml version=1.0 encoding=utf-8 ? 
- soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
- soap:Body
- HelloWorldResponse xmlns=http://tempuri.org/;
  HelloWorldResultHello World/HelloWorldResult 
  /HelloWorldResponse
  /soap:Body
  /soap:Envelope
  


s.Add(12, 24);

Send:

- HTTPHeaders
  hostlocalhost:8080/host 
  content-typetext/xml; charset=UTF-8/content-type 
  soapactionhttp://tempuri.org/HelloWorld;/soapaction 
  content-length362/content-length 
  /HTTPHeaders
  
  ?xml version=1.0 encoding=utf-8 ? 
- SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
- SOAP-ENV:Body
- ns1:Add xmlns:ns1=http://tempuri.org/;
  ns1:a12/ns1:a 
  ns1:b24/ns1:b 
  /ns1:Add
  /SOAP-ENV:Body
  /SOAP-ENV:Envelope
  
  
Return:

- HTTPHeaders
  serverMicrosoft-IIS/5.1/server 
  dateTue, 16 May 2006 20:21:07 GMT/date 
  x-powered-byASP.NET/x-powered-by 
  x-aspnet-version2.0.50727/x-aspnet-version 
  cache-controlprivate, max-age=0/cache-control 
  content-typetext/xml; charset=utf-8/content-type 
  content-length363/content-length 
  /HTTPHeaders
  
  
  ?xml version=1.0 encoding=utf-8 ? 
- soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
- soap:Body
- HelloWorldResponse xmlns=http://tempuri.org/;
  HelloWorldResultHello World/HelloWorldResult 
  /HelloWorldResponse
  /soap:Body
  /soap:Envelope

-Original Message-
From: Adrian Dick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 16, 2006 3:51 AM
To: Apache AXIS C User List
Subject: RE: AxisEngineException

Hi,

I'm surprised you're having problems using the same stub twice.  We have
numerous testcases which re-use the same stub object, including mixed
operations.

Looking at the trace, it would appear the second call didn't receive the
expected SOAP message.

Can you use TCPmon, or similiar, to capture the on-the-wire messages
when
making these two subsequent calls?
A copy of your WSDL would also be helpful, so we can ensure the correct
names and values are being used throughout.

Regards,
Adrian
___
Adrian Dick ([EMAIL PROTECTED])


Cheng, John [EMAIL PROTECTED] wrote on 15/05/2006 16:26:36:

 Adrian,

 Thanks for the help! I found the problem after enable the trace. It
was
 due to my searching path did not include the directory where
 AxisXMLParserXerces.dll is located. My testing sample is working now.
 But I found another interesting problem with the library, though. I
have
 a piece of code looks like this:

   ServiceSoap
 s(http://localhost/WebService1/service.asmx;);
   xsd__string str = s.HelloWorld();
   int x = s.Add(12, 24);

 My experience with other web service client code told me the two
 sequential calls should work. But it's not working here. Only the
first
 call works. The second one will give an AxisGenException. After I
switch
 my calling sequence, it's the same. The second one doesn't work. Why
is
 there such limitation? I attached my log file this time.

 Thanks!

 John Cheng


 -Original Message-
 From: Adrian Dick [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 10, 2006 3:06 AM
 To: Apache AXIS C User List
 Subject: Re: AxisEngineException

 Hi,

 Have you tried turning on trace?  ( See
 http://ws.apache.org/axis/cpp/TraceGuide.html#enablingRuntimeTrace and
 possibly also
 http://ws.apache.org/axis/cpp/TraceGuide.html#enablingStartupTrace )
 This may give you some pointers to the problem, if there's 

[Axis 1.4] generate wsdl with soap attachment

2006-05-16 Thread Anthony Perritano
Hi,I have a method in a java bean that i want to turn into a webservice that returns a soap attachment of file to the client. From various articles i have read that your method must return a DataHandler object. 
my method looks like:public DataHandler getXYZ()when i run java2wsdl on the javabean, i get xsd:anytype as the return type in my wsdl and no attachment information. do i have insert the soap attachment information in my wsdl manually? is there a way java2wsdl can generate it? 
thx for your helpAnthony


Re: [Axis 1.4] generate wsdl with soap attachment

2006-05-16 Thread Rodrigo Ruiz
Anthony, check that activation and mail jars are both in the classpath 
for java2wsdl. It needs these two libraries for attachment support.


HTH,
Rodrigo

Anthony Perritano wrote:

Hi,
I have a method in a java bean that i want to turn into a webservice 
that returns a soap attachment of file to the client. From various 
articles i have read that your method must return a DataHandler object.


my method looks like:

public DataHandler getXYZ()

when i run java2wsdl on the javabean, i get xsd:anytype as the return 
type in my wsdl and no attachment information. do i have insert the soap 
attachment information in my wsdl manually? is there a way java2wsdl can 
generate it?


thx for your help
Anthony




No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/05/2006


--
---
GRIDSYSTEMSRodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorcamailto:[EMAIL PROTECTED]
Baleares - España  Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
---


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/05/2006



Unit Testing WebServices Axis 1.2/1.3

2006-05-16 Thread Sreenidhi N K



Hi,

I am developing webservices using Axis 1.3 to
expose some operations in a web application.The service class
accesses the POJO business classes most of the time. Some of the web service
operationsaccess stateless ejb.
I need to write unit test for the web service
operations I am exposing. How can I test the services during ANT build process so
that I am sure it does not break any of the features? It would be great if
somebody can suggest "out of the container" test framework that I can integrate
with my build process. Is there any "in container" framework?



Regards
Sree


The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to whom they are addressed and is subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.

www.aztecsoft.com


Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Carsten Schmidt
Hi Rodrigo,
these ideas are very interesting.

First of all, thanks a lot for that.

But for the first way of making the host address configurable, I still
have to ask you, how to do that in detail?

I don't mean how to read the address from a properties file, but how can
I set the value?

Carsten


Am Montag, den 15.05.2006, 17:28 +0200 schrieb Rodrigo Ruiz:
 Carsten,
 
 In fact, there are several ways to handle your situation, but I
 guess  
 almost none of them is as simple as adding some lines to your client  
 code. The ones I know are:
 
 - Make the host address configurable. That is, read the host address  
 from a configuration file. I know this is not what you are asking
 for,  
 but it is probably the only easy workaround to your problem. In fact,
 I  
 think it will be the only one that will work if you want to test
 your  
 client application from the same host, and manually select the
 adapter  
 to use.
 
 - You may use DNS to provide a common name to your server, and access
 it  
 through host name, instead of host address. This probably means some  
 work to get your client domain name, in order to build the complete
 host  
 name in each subnetwork, or be sure that using the host name without
 a  
 domain name will return you the correct host address in all cases.
 
 - In a more complicated fashion, you could decide to convert your  
 service in a standard service, and register it into your DNS
 servers.  
 DNS protocol allows to register the addresses for standard
 services,  
 providing a simplistic discovery service, and allowing you to ask for
 a  
 service name, instead of a host name. AFAIK, this option is not
 usual,  
 but it should work. I am not sure, but you may probably need to use  
 Jakarta commons-net library to perform such kind of queries to your
 DNS  
 server.
 
 - You can delegate the problem to a well-known UDDI server. Anyway,
 if  
 you use TCP/IP, this will just move your problem from one host to  
 another, as this UDDI server/s will probably also have different  
 addresses  in each sub-network.
 
 - You might use some UDP based discovery service. The idea in this
 case  
 would be to send a broadcast message, and receive the appropriate  
 address from some arbitrary point on your network. If you implement
 such  
 a service in your own server, you will probably be able to get the
 host  
 address from the response message meta-data itself. There are some  
 standard libraries for achieving this out there, or you could try to  
 implement your own, as it is plenty of examples on Google ;-)
 
 Hope this helps, 
 Rodrigo
 
 
 Carsten Schmidt wrote: 
  Hi Alain, 
  thanks for your answer, but it seems as if the
 NetworkInterface-class 
  would just be able to give you information about the interfaces. 
   
  For me, it is important to tell the program which Interface to use, 
  because the webserver I'm working on got different IP's in
 different 
  sub-networks. 
   
  So, I am looking for a method like setHostAdress(foo). Maybe this
 is 
  more a part of java than axis, but the Axis-Call-class seems to
 handle 
  the whole hardware/network-stuff on it's own. 
   
  I can't believe that there is no smart way to handle this. 
   
  Carsten 
   
   
  Am Montag, den 15.05.2006, 16:28 +0200 schrieb Pannetier Alain: 
  Hi Carsten, 
  
  Here is an example I use to know whether I'm in the office or at 
  home :   
  
  try {  
  Enumeration myInterfaces = 
  NetworkInterface.getNetworkInterfaces();  
interfaceEnum:  
while ( myInterfaces.hasMoreElements()) {  
NetworkInterface netInterf = (NetworkInterface)  
myInterfaces.nextElement();  
Enumeration addresses = netInterf.getInetAddresses() ;  
while (addresses.hasMoreElements()) {  
InetAddress address = (InetAddress) 
  addresses.nextElement();  
if 
  ( address.getHostAddress().startsWith( OFFICE_PREFIX ) ) {  
isAtTheOffice = true ;  
break interfaceEnum ;  
}  
}  
}  
   } catch (SocketException e) {  
e.printStackTrace();  
   }  
  ... 
  
  It shows how to loop on all your interfaces and select one
 (according 
  to its address prefix...). 
  
  That's probably close to what your're after. 
  
  Alain 
  
  
  -Original Message-  
  From: Schmidt, Carsten -81.01-
 [mailto:[EMAIL PROTECTED]   
  Sent: 15 May 2006 16:17  
  To: axis-user@ws.apache.org  
  Subject: RE: Select the output-network-interface to call an 
  axis-webservice 
  
  Hi,  
  did really no one every had a problem like that?  
  This problem can not be so special, can it? 
  
  But maybe you know another mailinglist or a book, which might be
 able 
  to help me? 
  
  It is really important for me to find a solution for that, and 
  meanwhile I ain't got no more idea where to look at. 
  
  Regards, 
  
  Carsten 
  

  Hi 

Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Rodrigo Ruiz

Ok,

If you look at the very first example in the users guide:

1   import org.apache.axis.client.Call;
2   import org.apache.axis.client.Service;
3   import javax.xml.namespace.QName;
4
5   public class TestClient {
6 public static void main(String [] args) {
7   try {
8 String endpoint =
9 http://ws.apache.org:5049/axis/services/echo;;
10
11Service  service = new Service();
12Call call= (Call) service.createCall();
13
14call.setTargetEndpointAddress( new java.net.URL(endpoint) );
15call.setOperationName(new QName(http://soapinterop.org/;, 
echoString));

16
17String ret = (String) call.invoke( new Object[] { Hello! } );
18
19System.out.println(Sent 'Hello!', got ' + ret + ');
20  } catch (Exception e) {
21System.err.println(e.toString());
22  }
23}
24  }

You can see that the service endpoint is a URL declared at lines 8-9. 
You simply have to build this URL using the host you have read from your 
configuration file.



If you are working with generated stubs, you will find that your Service 
class has at least two getPortName() methods (more if you use a 
WS-Addressing aware generator).


One of these methods gets a URL instance as a parameter. This URL must 
contain the endpoint URL, that is, the same URL you would use in the 
example above. Therefore, you can again build this URL using your 
configured host name.


You may allow configuring only a part of your endpoints, like in:

String hostName = myProps.getProperty(hostName);
URL url = new URL(http://; + hostName + /axis/services/echo);

or you may get the full endpoint URL from your configuration file, like:

String echoEndpoint = myProps.getProperty(Endpoint.Echo);
URL url = new URL(echoEndpoint);

I personally think the second option gives you more freedom to change 
your server deployment at will.


HTH,
Rodrigo


Carsten Schmidt wrote:

Hi Rodrigo,
these ideas are very interesting.

First of all, thanks a lot for that.

But for the first way of making the host address configurable, I still
have to ask you, how to do that in detail?

I don't mean how to read the address from a properties file, but how can
I set the value?

Carsten


Am Montag, den 15.05.2006, 17:28 +0200 schrieb Rodrigo Ruiz:

Carsten,

In fact, there are several ways to handle your situation, but I
guess  
almost none of them is as simple as adding some lines to your client  
code. The ones I know are:


- Make the host address configurable. That is, read the host address  
from a configuration file. I know this is not what you are asking
for,  
but it is probably the only easy workaround to your problem. In fact,
I  
think it will be the only one that will work if you want to test
your  
client application from the same host, and manually select the
adapter  
to use.


- You may use DNS to provide a common name to your server, and access
it  
through host name, instead of host address. This probably means some  
work to get your client domain name, in order to build the complete
host  
name in each subnetwork, or be sure that using the host name without
a  
domain name will return you the correct host address in all cases.


- In a more complicated fashion, you could decide to convert your  
service in a standard service, and register it into your DNS
servers.  
DNS protocol allows to register the addresses for standard
services,  
providing a simplistic discovery service, and allowing you to ask for
a  
service name, instead of a host name. AFAIK, this option is not
usual,  
but it should work. I am not sure, but you may probably need to use  
Jakarta commons-net library to perform such kind of queries to your
DNS  
server.


- You can delegate the problem to a well-known UDDI server. Anyway,
if  
you use TCP/IP, this will just move your problem from one host to  
another, as this UDDI server/s will probably also have different  
addresses  in each sub-network.


- You might use some UDP based discovery service. The idea in this
case  
would be to send a broadcast message, and receive the appropriate  
address from some arbitrary point on your network. If you implement
such  
a service in your own server, you will probably be able to get the
host  
address from the response message meta-data itself. There are some  
standard libraries for achieving this out there, or you could try to  
implement your own, as it is plenty of examples on Google ;-)


Hope this helps, 
Rodrigo



Carsten Schmidt wrote: 
Hi Alain, 
thanks for your answer, but it seems as if the
NetworkInterface-class 
would just be able to give you information about the interfaces. 
 
For me, it is important to tell the program which Interface to use, 
because the webserver I'm working on got different IP's in
different 
sub-networks. 
 
So, I am looking for a method like setHostAdress(foo). Maybe this
is 

more a part of java than axis, but the Axis-Call-class seems to
handle 
the whole 

[Axis2][1.0] Transport error 500 for EchoBlockingDualClient echoF

2006-05-16 Thread Ali Sadik Kumlali
Hi all,

When I use EchoBlockingDualClient to invoke echoF service which throws
AxisFault, I run into a strange(?) situation.

Server returnes back an error through the *first* channel. Error says
Transport error 500 . Error Message is htmlheadtitleApache
Tomcat/5.5.14 - Error report

Then the server sends the actual error over the *second* channel. 

When I look at the server logs, AxisFault thrown by echoF is shown.
There seems no transport related errors.

However, client *only* catches the first error and writes it down to
the console. Then, it throws another exception that says
org.apache.axis2.AxisFault: Time out while waiting for the server to
send the response

I've listed echoF and the client side stack trace below.

Is this the expected behaviour or should I create a JIRA log?

Thanks in advance,

Ali Sadik Kumlali



public OMElement echoF(OMElement element) throws AxisFault {
  throw new AxisFault(MyFault message, MyFaultCode);
}


- Transport error 500 . Error Message is htmlheadtitleApache
Tomcat/5.5.14 - Error report/titlestyle!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--/style
/headbodyh1HTTP Status 500 - /h1HR size=1
noshade=noshadepbtype/b Status report/ppbmessage/b
u/u/ppbdescription/b uThe server encountered an internal
error () that prevented it from fulfilling this request./u/pHR
size=1 noshade=noshadeh3Apache Tomcat/5.5.14/h3/body/html;
nested exception is: 
...


org.apache.axis2.AxisFault: Time out while waiting for the server to
send the response[SimpleHTTPServer] Stop called
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:448)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
at
userguide.clients.EchoBlockingDualClient.main(EchoBlockingDualClient.java:54)


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: [Axis2][1.0] Transport error 500 for EchoBlockingDualClient echoF

2006-05-16 Thread Ali Sadik Kumlali
Hi,

Since I beleive this is a bug, to enable easier following, I created a
JIRA log: http://issues.apache.org/jira/browse/AXIS2-741

Since separate listener case is very important, I beleive this is
actually a blocker issue. (If I'm not missing something ;-)

Regards,

Ali Sadik Kumlali

--- Ali Sadik Kumlali [EMAIL PROTECTED] wrote:

 Hi all,
 
 When I use EchoBlockingDualClient to invoke echoF service which
 throws
 AxisFault, I run into a strange(?) situation.
 
 Server returnes back an error through the *first* channel. Error says
 Transport error 500 . Error Message is htmlheadtitleApache
 Tomcat/5.5.14 - Error report
 
 Then the server sends the actual error over the *second* channel. 
 
 When I look at the server logs, AxisFault thrown by echoF is shown.
 There seems no transport related errors.
 
 However, client *only* catches the first error and writes it down to
 the console. Then, it throws another exception that says
 org.apache.axis2.AxisFault: Time out while waiting for the server to
 send the response
 
 I've listed echoF and the client side stack trace below.
 
 Is this the expected behaviour or should I create a JIRA log?
 
 Thanks in advance,
 
 Ali Sadik Kumlali
 
 
 
 public OMElement echoF(OMElement element) throws AxisFault {
   throw new AxisFault(MyFault message, MyFaultCode);
 }
 
 
 - Transport error 500 . Error Message is htmlheadtitleApache
 Tomcat/5.5.14 - Error report/titlestyle!--H1

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
 H2

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
 H3

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
 BODY

{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
 B

{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
 P

{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
 {color : black;}A.name {color : black;}HR {color :
 #525D76;}--/style
 /headbodyh1HTTP Status 500 - /h1HR size=1
 noshade=noshadepbtype/b Status report/ppbmessage/b
 u/u/ppbdescription/b uThe server encountered an
 internal
 error () that prevented it from fulfilling this request./u/pHR
 size=1 noshade=noshadeh3Apache
 Tomcat/5.5.14/h3/body/html;
 nested exception is: 
 ...
 
 
 org.apache.axis2.AxisFault: Time out while waiting for the server to
 send the response[SimpleHTTPServer] Stop called
   at

org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:448)
   at

org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
   at

userguide.clients.EchoBlockingDualClient.main(EchoBlockingDualClient.java:54)
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Carsten Schmidt
Hi,
oh, maybe we missunderstood each other.
There is no problem with the IP the service is running on.

On another machine a servlet is calling this service. For this call I
have to determine a special outgoing-IP, because it is a webserver on
which each webapp has it's own virtual-IP.

Only the IP from the app has the necessary permissions to pass the
firewall correctly.

By default the axis-call doesn't use the virtual-IP from the
webapp-context, but the IP from the server itself.

In detail:

Webserver with the IP 10.33.5.1
Virtual IP for the webapp 10.33.5.67

Carsten 




Am Dienstag, den 16.05.2006, 09:47 +0200 schrieb Rodrigo Ruiz:
 Ok,
 
 If you look at the very first example in the users guide:
 
 1   import org.apache.axis.client.Call; 
 2   import org.apache.axis.client.Service; 
 3   import javax.xml.namespace.QName; 
 4 
 5   public class TestClient { 
 6 public static void main(String [] args) { 
 7   try { 
 8 String endpoint = 
 9 http://ws.apache.org:5049/axis/services/echo;; 
 10 
 11Service  service = new Service(); 
 12Call call= (Call) service.createCall(); 
 13 
 14call.setTargetEndpointAddress( new
 java.net.URL(endpoint) ); 
 15call.setOperationName(new QName(http://soapinterop.org/;,  
 echoString)); 
 16 
 17String ret = (String) call.invoke( new Object[]
 { Hello! } ); 
 18 
 19System.out.println(Sent 'Hello!', got ' + ret + '); 
 20  } catch (Exception e) { 
 21System.err.println(e.toString()); 
 22  } 
 23} 
 24  }
 
 You can see that the service endpoint is a URL declared at lines
 8-9.  
 You simply have to build this URL using the host you have read from
 your  
 configuration file.
 
 
 If you are working with generated stubs, you will find that your
 Service  
 class has at least two getPortName() methods (more if you use a  
 WS-Addressing aware generator).
 
 One of these methods gets a URL instance as a parameter. This URL
 must  
 contain the endpoint URL, that is, the same URL you would use in the  
 example above. Therefore, you can again build this URL using your  
 configured host name.
 
 You may allow configuring only a part of your endpoints, like in:
 
 String hostName = myProps.getProperty(hostName); 
 URL url = new URL(http://; + hostName + /axis/services/echo);
 
 or you may get the full endpoint URL from your configuration file,
 like:
 
 String echoEndpoint = myProps.getProperty(Endpoint.Echo); 
 URL url = new URL(echoEndpoint);
 
 I personally think the second option gives you more freedom to
 change  
 your server deployment at will.
 
 HTH, 
 Rodrigo
 
 
 Carsten Schmidt wrote: 
  Hi Rodrigo, 
  these ideas are very interesting. 
   
  First of all, thanks a lot for that. 
   
  But for the first way of making the host address configurable, I
 still 
  have to ask you, how to do that in detail? 
   
  I don't mean how to read the address from a properties file, but how
 can 
  I set the value? 
   
  Carsten 
   
   
  Am Montag, den 15.05.2006, 17:28 +0200 schrieb Rodrigo Ruiz: 
  Carsten, 
  
  In fact, there are several ways to handle your situation, but I 
  guess   
  almost none of them is as simple as adding some lines to your
 client   
  code. The ones I know are: 
  
  - Make the host address configurable. That is, read the host
 address   
  from a configuration file. I know this is not what you are asking 
  for,   
  but it is probably the only easy workaround to your problem. In
 fact, 
  I   
  think it will be the only one that will work if you want to test 
  your   
  client application from the same host, and manually select the 
  adapter   
  to use. 
  
  - You may use DNS to provide a common name to your server, and
 access 
  it   
  through host name, instead of host address. This probably means
 some   
  work to get your client domain name, in order to build the
 complete 
  host   
  name in each subnetwork, or be sure that using the host name
 without 
  a   
  domain name will return you the correct host address in all cases. 
  
  - In a more complicated fashion, you could decide to convert
 your   
  service in a standard service, and register it into your DNS 
  servers.   
  DNS protocol allows to register the addresses for standard 
  services,   
  providing a simplistic discovery service, and allowing you to ask
 for 
  a   
  service name, instead of a host name. AFAIK, this option is not 
  usual,   
  but it should work. I am not sure, but you may probably need to
 use   
  Jakarta commons-net library to perform such kind of queries to
 your 
  DNS   
  server. 
  
  - You can delegate the problem to a well-known UDDI server.
 Anyway, 
  if   
  you use TCP/IP, this will just move your problem from one host
 to   
  another, as this UDDI server/s will probably also have different   
  addresses  in each sub-network. 
  
  - You might use some UDP based discovery service. The idea in this 
  case   
  would be 

Re: [Axis2] multiple threads

2006-05-16 Thread Deepal Jayasinghe
proper approach is to use

 init(ServiceConetx)
destroy(ServiceContext);

any way its better to create a JIRA , since we need to call destroy
method when service removed from the system , its not tomcat problem its
Axis2 problem.

Roman Weidlich wrote:

 MyService (application scope) starts in its constructor a thread:

   private static boolean first = true;

 public MyService() {
   if (first) {
 Thread t = new Thread(this);
 t.start();
 first = false;
   }
 }

 On redeploy (drop a new MyService.aar into axis2 services dir) and on
 the next invocation of MyService the old thread is still running!

 It seems tomcat don't kill the thread started by MyService before.



-- 
Thanks,
Deepal

~Future is Open~ 





Re: [Axis2 1.0] Missing namespace on subelement

2006-05-16 Thread Deepal Jayasinghe
pls create a JIRA

Dave MacLean wrote:

Hello everyone,
We're running into a bit of trouble since we moved from axis2 0.95 to
1.0.

The below all worked fine on 0.95:

The complex type in question is defined in the wsdl as:


s:complexType name=Credential
   s:sequence/
/s:complexType

s:complexType name=EnterpriseCredential
s:complexContent
   s:extension base=s0:Credential
   s:sequence/
   s:attribute name=Login type=s:string
use=required/
   s:attribute name=Password type=s:string
use=optional/
   s:attribute name=Locale type=s:string
use=optional/
   s:attribute name=TimeZone type=s:string
use=optional/
   s:attribute name=Domain type=s:string
use=optional/
   s:attribute name=AuthType type=s:string
use=optional/
   /s:extension
/s:complexContent
/s:complexType


In the provider's skeleton, we have the following:

public com.businessobjects.dsws.session.LoginResponseDocument login(
com.businessobjects.dsws.session.LoginDocument param12)
throws
com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException,
RemoteException {
   Login obj = param12.getLogin();
   Credential cred = obj.getCredential();


The problem is, on the getCredential() call, we actually get back an
object of type Credential (base class) when the method was invoked with
an enterprise credential.  So that further on, on the line:

EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;

We get a class cast exception.

Tracing through a bit with the SOAPMonitor, we noticed that the xml
envelope actually ends up looking like:

?xml version='1.0' encoding='utf-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Header /
soapenv:Body
login xmlns=session.dsws.businessobjects.com
credential xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
Password= Domain=vanyma01 xsi:type=ses:EnterpriseCredential
Login=administrator /
/login
/soapenv:Body
/soapenv:Envelope

Where the namespace definition of ses is clearly missing.  If you
trace through the deserialization code a bit, this is why the object
comes back as the base class instead of the extended type.

Once thing interesting one of our developer's noticed, is that if, on
the consumer side, you add the lines:

XmlOptions op1 = new XmlOptions();
op1.setSaveNamespacesFirst();
m_credential =
EnterpriseCredential.Factory.newInstance(op1);

At the time you create the credential, it seems that *some of the time*
this fixes the problem, so that the xml appears as:

?xml version='1.0' encoding='utf-8'?
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
soapenv:Header /
soapenv:Body
login xmlns=session.dsws.businessobjects.com
credential xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:ses=session.dsws.businessobjects.com Password=
Domain=vanyma01 xsi:type=ses:EnterpriseCredential
Login=administrator /
/login
/soapenv:Body
/soapenv:Envelope

But only some of the time.

Is it possible there's a race condition here and that somehow the
attribute list is getting overwritten, or are we doing something wrong?

Thanks in advance,

Dave


  


-- 
Thanks,
Deepal

~Future is Open~ 





Re: [Axis2] Integrating Axis 2 in an application

2006-05-16 Thread Deepal Jayasinghe
Hi Ingo
pls see my comment below;

Ingo Siebert wrote:

 Hi all,

 i want to create an which includes Axis 2 for my web services. That
 means, my WAR file includes my application + axis 2 libraries.
 Ok, now some questions:

 - Do i need to specify org.apache.axis2.transport.http.AxisServlet
 in my web.xml as a servlet?

If you have your won servlet to handle incoming message and hand over
that to AxisEngine then you dont need to specify above.


 - Is a Axis2.xml file needed?

yes/ no :) , you can create an AxisConfiguration programaticaly , as you
know to start an Axis2 system main consideration is AxisConfiguration.
So if you can create AxisConfiguration somehow you dont need axis2.xml ,
axis2.xml is just to create AxisConfiguration object


 - Is the only way to deploy my web service a AAR file which includes
 my service.xml?
   Or can i simply put my service.xml in my WEB-INF directory?

you can not just drop services.xml into web-inf dir , there are few
other was to deploy service
 - you can create and deploy service using a java class
 - you can deploy service as exploded dirs


 - I'm looking for an axis2 code sample of a project which serialize
 and deserialize beans(doc literal wrapped)?

 - Why does the code generation tool creates 700 lines of code for the
 client stub of a very simple web service? A few more comments would be
 very useful in the generated code.

that the nature of codegeneration , btw did u use xmlbeans or adb ?


 Cheers,

 Ingo Siebert


-- 
Thanks,
Deepal

~Future is Open~ 





Re: [Axis2 1.0] NullPointerException at StAXOMBuilder.next() when using rampart

2006-05-16 Thread Reshef Roy

Hi Ruchith,

Thanks for the fast reaction. I've downloaded your new
axiom-dom jar, however I still got the same
exception...
Then I removed the axiom-dom jar altogether (from both
the client respository and the server), and I still
got the very same exception (so no
ClassNotFoundException...). Further investigation
showed that the
org.apache.axiom.om.impl.dom.CharacterImpl was used
from the axiom-api-1.0.jar, NOT from the axiom-dom
jar.  I unpacked both jars and compared them, it seems
to me that the axiom-dom jar is actually a subset of
the classes in the axiom-api jar. And all of these
(except for org.apache.axiom.om.impl.dom.CharacterImpl
and org.apache.axiom.om.impl.dom.TextImpl) were
identical. I cannot imagine that it's meant to be
so...

I cannot remove the axiom-api-1.0.jar as the startup
of Axis2 under Tomcat fails... I can try to mess
around with the order in the classpath of both the
client repository and the server, but I guess it would
be easier (and better) to solve this duplication by
either merging the two jars or removing the duplicate
classes from the axiom-api jar.

Thanks again,

/ Roy


--- Ruchith Fernando [EMAIL PROTECTED]
wrote:

 Hi Roy,
 
 Thank you for reporting this problem ... I traced
 the issue to the
 org.apache.axiom.om.impl.dom.CharacterImpl of the
 OM-DOM
 implementation (DOOM) and this is fixed in SVN
 revision : 406708
 
 Please replace your axiom-dom-1.0.jar with this [1]
 and try again.
 
 Thanks,
 Ruchith
 
 [1]

http://people.apache.org/~ruchithf/axiom-dom-406708.jar
 
 On 5/15/06, Reshef Roy [EMAIL PROTECTED] wrote:
  Hi all,
 
  This is maybe a stupid problem resluting from the
 fact
  that I am not a WS/SOAP expert, but I've been
 fighting
  with it for almost a week now with no results,
  therefore any kind of help will be appreciated.
 
  I am using Axis2 1.0 and jre1.5.0_06.
  My service is deployed on Tomcat 5.5.16 (Axis2 1.0
 WAR
  distribtion) and my test client is a simple
 standalone
  Java application, which uses an Axis2 repository
 and
  which is invoked using an ANT build file.
 
  On both the client and the server I engage the
  addressing-1.0 module and the security
 (rampart-1.0)
  module; WSS4J version is 1.5.0. Both the client
 and
  the server are configured to enable MTOM.
 
  When I DO NOT configure any usage of the rampart
  module (in both axis2.xml of the client repo and
  services.xml of the AAR service), everything goes
 well
  - the SOAP messages are going back and forth and
 are
  succesfully consumed by the service and the
 client,
  respectively.
 
  When I configure the client-server message
  (OutflowSecurity of the client and InflowSecurity
 of
  the service) with the actions Timestamp Signature
  Encrypt (in a similar manner to the security
 sample),
  everything goes well.
  However, when I configure the server-client
 message
  (OutflowSecurity of the service and InflowSecurity
 of
  the client) with the actions Timestamp Signature
  Encrypt (in a similar manner to the security
 sample),
  I get the following exception on the server side.
 As
  it complains on the SOAP envelope and states
 

soapenv:Codesoapenv:Valuesoapenv:Sender/soapenv:Value/soapenv:Code
  it seems to me that the problem is in my incoming
  (client-server) message. I have tried to locate
 it,
  but in vain.
 

[rest of message truncated]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Rodrigo Ruiz

Wow!

Ok, I guess the solution to your problem will depend on where do you 
want to set the address. Could you elaborate a bit more?


Are you talking about the client-side or the server-side? I guess you 
are talking about the server response, but I am not sure.


Could you describe a bit your server deployment configuration? Do you 
have a single Axis webapp and you want to customize its behavior 
depending on the incoming network adapter, or you have separate webapps 
for each virtual-IP?


Regards,
Rodrigo

Carsten Schmidt wrote:

Hi,
oh, maybe we missunderstood each other.
There is no problem with the IP the service is running on.

On another machine a servlet is calling this service. For this call I
have to determine a special outgoing-IP, because it is a webserver on
which each webapp has it's own virtual-IP.

Only the IP from the app has the necessary permissions to pass the
firewall correctly.

By default the axis-call doesn't use the virtual-IP from the
webapp-context, but the IP from the server itself.

In detail:

Webserver with the IP 10.33.5.1
Virtual IP for the webapp 10.33.5.67

Carsten 





Am Dienstag, den 16.05.2006, 09:47 +0200 schrieb Rodrigo Ruiz:

Ok,

If you look at the very first example in the users guide:

1   import org.apache.axis.client.Call; 
2   import org.apache.axis.client.Service; 
3   import javax.xml.namespace.QName; 
4 
5   public class TestClient { 
6 public static void main(String [] args) { 
7   try { 
8 String endpoint = 
9 http://ws.apache.org:5049/axis/services/echo;; 
10 
11Service  service = new Service(); 
12Call call= (Call) service.createCall(); 
13 
14call.setTargetEndpointAddress( new
java.net.URL(endpoint) ); 
15call.setOperationName(new QName(http://soapinterop.org/;,  
echoString)); 
16 
17String ret = (String) call.invoke( new Object[]
{ Hello! } ); 
18 
19System.out.println(Sent 'Hello!', got ' + ret + '); 
20  } catch (Exception e) { 
21System.err.println(e.toString()); 
22  } 
23} 
24  }


You can see that the service endpoint is a URL declared at lines
8-9.  
You simply have to build this URL using the host you have read from
your  
configuration file.



If you are working with generated stubs, you will find that your
Service  
class has at least two getPortName() methods (more if you use a  
WS-Addressing aware generator).


One of these methods gets a URL instance as a parameter. This URL
must  
contain the endpoint URL, that is, the same URL you would use in the  
example above. Therefore, you can again build this URL using your  
configured host name.


You may allow configuring only a part of your endpoints, like in:

String hostName = myProps.getProperty(hostName); 
URL url = new URL(http://; + hostName + /axis/services/echo);


or you may get the full endpoint URL from your configuration file,
like:

String echoEndpoint = myProps.getProperty(Endpoint.Echo); 
URL url = new URL(echoEndpoint);


I personally think the second option gives you more freedom to
change  
your server deployment at will.


HTH, 
Rodrigo



Carsten Schmidt wrote: 
Hi Rodrigo, 
these ideas are very interesting. 
 
First of all, thanks a lot for that. 
 
But for the first way of making the host address configurable, I
still 
have to ask you, how to do that in detail? 
 
I don't mean how to read the address from a properties file, but how
can 
I set the value? 
 
Carsten 
 
 
Am Montag, den 15.05.2006, 17:28 +0200 schrieb Rodrigo Ruiz: 
Carsten, 

In fact, there are several ways to handle your situation, but I 
guess   
almost none of them is as simple as adding some lines to your
client   
code. The ones I know are: 


- Make the host address configurable. That is, read the host
address   
from a configuration file. I know this is not what you are asking 
for,   
but it is probably the only easy workaround to your problem. In
fact, 
I   
think it will be the only one that will work if you want to test 
your   
client application from the same host, and manually select the 
adapter   
to use. 


- You may use DNS to provide a common name to your server, and
access 
it   
through host name, instead of host address. This probably means
some   

work to get your client domain name, in order to build the
complete 
host   
name in each subnetwork, or be sure that using the host name
without 
a   
domain name will return you the correct host address in all cases. 


- In a more complicated fashion, you could decide to convert
your   
service in a standard service, and register it into your DNS 
servers.   
DNS protocol allows to register the addresses for standard 
services,   
providing a simplistic discovery service, and allowing you to ask
for 
a   
service name, instead of a host name. AFAIK, this option is not 
usual,   
but it should work. I am not sure, but you may probably need to
use   

Jakarta commons-net library to perform such kind of queries to
your 
DNS   

Exception in returning SOAP Fault.

2006-05-16 Thread Amitesh Pandya

Hi,
I'm currently working on project and we are using Axis2 + Sandesha2
(Both Version 1.0) for the WS-RM.

One of my requirements is to return a SOAP Fault after the validation fails.

I've created the service using WSDL2Java. The service works fine.
But when I try to throw an exception (Axis Fault) from the generated
Skeleton I get another Axis exception.

I looked into it and it seems to be a problem with the AXIOM.
The real problem happens when I try to call

inMessage.getEnvelope().getHeader()

Actually this method is called in the AxisEngine which is causing
all the troubles.

Please let me know if this is the known problem or If I'm missing something.

Kindly suggest what is the best way of sending the Custom SOAP Fault.

Your response to this query is greatly appreciated.

Thanks in advance
Amitesh

Please find the attached Stacktrace:

##

[16/05/06 11:22:49:505 BST] 0035 SystemErr R
org.apache.axiom.om.OMException
at 
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
at 
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
Code))
at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
at 
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
at 
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

The from the


Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Carsten Schmidt
Ok, it is about the communication between two Webservers (with Tomcat as
Servlet Engine).

My local Server provides a Servlet.
Well, it provides lots of Servlets on different tomcats.
Each of these tomcats has its own virtual IP apache listens on.
The server itself has another IP (Which is not used by an application
but to administrate the server).

The servlet calls an axis-service which runs on a completely different
server in another company.

The IP from my server (let's take 10.33.5.1. for example) is not allowed
to access the non-local webservice.
This is not changeable, the reason that for is uninteresting at the
moment.

The only IP, which can access is the one of my servlet (in this case
10.33.5.67).

If I am starting this servlet from my pc (10.33.5.100) it should run
like this:

10.33.5.100 (Browser) - 10.33.5.67 (Tomcat)
10.33.5.67 (Servlet running in Tomcat) - WebService anywhere in the
internet (including the answer, because axis handels this)
10.33.5.67 (Tomcat returns the generated website) - 10.33.5.100
(Browser)

but this way is broken because:

10.33.5.100 (Browser) - 10.33.5.67 (Tomcat)
10.33.5.1 tries to connect the webservice, what is denied by firewall.


With NetworkInterface.getNetworkInterfaces() it shows my all IPs
existing on the server. But it seems as if there was no way of manuelly
choosing which IP to use for an axis-connection.

This topic is awful, I know;-))


Am Dienstag, den 16.05.2006, 13:03 +0200 schrieb Rodrigo Ruiz:
 Wow!
 
 Ok, I guess the solution to your problem will depend on where do you  
 want to set the address. Could you elaborate a bit more?
 
 Are you talking about the client-side or the server-side? I guess
 you  
 are talking about the server response, but I am not sure.
 
 Could you describe a bit your server deployment configuration? Do
 you  
 have a single Axis webapp and you want to customize its behavior  
 depending on the incoming network adapter, or you have separate
 webapps  
 for each virtual-IP?
 
 Regards, 
 Rodrigo
 
 Carsten Schmidt wrote: 
  Hi, 
  oh, maybe we missunderstood each other. 
  There is no problem with the IP the service is running on. 
   
  On another machine a servlet is calling this service. For this call
 I 
  have to determine a special outgoing-IP, because it is a webserver
 on 
  which each webapp has it's own virtual-IP. 
   
  Only the IP from the app has the necessary permissions to pass the 
  firewall correctly. 
   
  By default the axis-call doesn't use the virtual-IP from the 
  webapp-context, but the IP from the server itself. 
   
  In detail: 
   
  Webserver with the IP 10.33.5.1 
  Virtual IP for the webapp 10.33.5.67 
   
  Carsten  
   
   
   
   
  Am Dienstag, den 16.05.2006, 09:47 +0200 schrieb Rodrigo Ruiz: 
  Ok, 
  
  If you look at the very first example in the users guide: 
  
  1   import org.apache.axis.client.Call;  
  2   import org.apache.axis.client.Service;  
  3   import javax.xml.namespace.QName;  
  4  
  5   public class TestClient {  
  6 public static void main(String [] args) {  
  7   try {  
  8 String endpoint =  
  9 http://ws.apache.org:5049/axis/services/echo;;  
  10  
  11Service  service = new Service();  
  12Call call= (Call) service.createCall();  
  13  
  14call.setTargetEndpointAddress( new 
  java.net.URL(endpoint) );  
  15call.setOperationName(new
 QName(http://soapinterop.org/;,   
  echoString));  
  16  
  17String ret = (String) call.invoke( new Object[] 
  { Hello! } );  
  18  
  19System.out.println(Sent 'Hello!', got ' + ret + ');  
  20  } catch (Exception e) {  
  21System.err.println(e.toString());  
  22  }  
  23}  
  24  } 
  
  You can see that the service endpoint is a URL declared at lines 
  8-9.   
  You simply have to build this URL using the host you have read
 from 
  your   
  configuration file. 
  
  
  If you are working with generated stubs, you will find that your 
  Service   
  class has at least two getPortName() methods (more if you use
 a   
  WS-Addressing aware generator). 
  
  One of these methods gets a URL instance as a parameter. This URL 
  must   
  contain the endpoint URL, that is, the same URL you would use in
 the   
  example above. Therefore, you can again build this URL using
 your   
  configured host name. 
  
  You may allow configuring only a part of your endpoints, like in: 
  
  String hostName = myProps.getProperty(hostName);  
  URL url = new URL(http://; + hostName + /axis/services/echo); 
  
  or you may get the full endpoint URL from your configuration file, 
  like: 
  
  String echoEndpoint = myProps.getProperty(Endpoint.Echo);  
  URL url = new URL(echoEndpoint); 
  
  I personally think the second option gives you more freedom to 
  change   
  your server deployment at will. 
  
  HTH,  
  Rodrigo 
  
  
  Carsten Schmidt wrote:  
  Hi Rodrigo,  
  these ideas are very interesting.  

  

[Axis2] JAXB 2 Binding

2006-05-16 Thread ebaykunde
Hi,

I want to use JAXB RI 2 as databinding for axis.
I downloaded the last nightly build and saw a
org.apache.axis2.jaxbri.CodeGenerationUtility class.

So I think, it's now implemented?
Then I added the axis jars (from the bin distribution) and the jaxb 2 jars
from Sun to the Classpath of my ant file.

ant snippet:
taskdef name=codegen
classname=org.apache.axis2.tool.ant.AntCodegenTask
  classpath
fileset dir=${lib.axis} includes=*.jar /
fileset dir=${lib.jaxb} includes=*.jar /
  /classpath
/taskdef

Then I got the error message:
JAX-B RI binding extension not in Classpath.

It seems that the above mentioned class is not in the nightly build? So I
took additionally the one class from the source to the classpath.

Now I get the error message:
wsdl2java:

BUILD FAILED
...
 org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException


Nothing else!

Any help would be very appreciated!

Regards,
Ralph



Message Handler

2006-05-16 Thread Anne Vetter
I'm trying to implement a handler to process SOAP headers.Now, I've got one major problem.Do I have to deploy that handler separately? My WS works without handlers ... but as soon as I implement my handler in the 
deploy.wsdd file it just won't work any more. If I deploy the handler first and then try to deploy the WS, Axis tells me:Exception - org.apache.axis.ConfigurationException: Can't find handler name:'null' type:'AuthenticationHandler' in the registry
org.apache.axis.ConfigurationException: Can't find handler name:'null' type:'AuthenticationHandler' in the registry	at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:129)	at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance
(WSDDDeployableItem.java:274)	at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)	at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:430)
	at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:503)	at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:296)	at org.apache.axis.transport.http.AxisServlet.reportAvailableServices
(AxisServlet.java:482)	at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:260)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)	at org.apache.axis.transport.http.AxisServletBase.service
(AxisServletBase.java:327)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)	at java.lang.Thread.run(Unknown Source)I just seem not to be able to solve that myself. I've tried to look for detailed information online, and I've found plenty of stuff about handlers themselves, but not really much about their deployment.



[Axis2] endpoint test, backward compatibilty and WSDL2Java

2006-05-16 Thread Mérième N
Hi,I want to test a SOAP endpoint ot the Version like in Axis 1.3.I type http://localhost:8080/axis2/services/versionor http://localhost:8080/axis2/services/version?method=getVersionthe page displayed the following message:Requested resource not found!The link in order to generate the WSDL works.However I follow step by step the guidelines in the installation guide. All the other pages are displayed as expected.An another question, I developed a Web Service under Axis 1.3. I wanted to upload the jar files via the administaton site. This service is displayed as a
 faulty service. In general, can Axis2 deployed a web service developed under a previous version?Can it have a backward compatibility?I try to enforce the WSDL2Java command line advised in the user guideWSDL2Java -uri ..\samples\wsdl\Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans-o ..\samples -p org.apache.axis2.userguideThis error is displayed. 'WSDL2Java' is not recognized as an internal or external command,operable program or batch file.Do I have to call this tool in another way ?Could you help me to fix that.Thanking you in advance.Merieme

Re: Attachment use in the WS skeleton

2006-05-16 Thread Charles Souillard

Could you help me ?

Thanks a lot
Charles

Charles Souillard wrote:

Hi,

you can find in attachment the client, the wsdl and the skeleton files.

Thanks a lot for your help.

Charles


Charles Souillard wrote:

Hi,

I have added the enable mtom property(true)
I still have an error. Which code  should I execute in the skeleton 
when this property is enabled ?
With no change, the cast OMText binaryNode = (OMText) 
imageEl.getFirstOMChild(); fails.


And with the property, the message I can catch between my client and 
axis is the following :

Thanks for your help.

POST /axis2/services/HelloWorldServiceBP HTTP/1.1
User-Agent: Axis2
SOAPAction: initiate
Host: localhost:12000
Transfer-Encoding: chunked
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801; 
type=application/xop+xml; 
start=0.urn:uuid:[EMAIL PROTECTED]; 
start-info=text/xml; charset=UTF-8

b5d
--MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801
content-type:application/xop+xml; charset=UTF-8; type=text/xml;
content-transfer-encoding:binary
content-id:
0.urn:uuid:[EMAIL PROTECTED]
 ?xml version='1.0' encoding='UTF-8'?
soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

   soapenv:Header /
   soapenv:Body
  tns:initiateHelloWorld xmlns:tns=urn:helloworld:bpel:bsoap
 tns:image
xop:Include 
href=cid:1.urn:uuid:[EMAIL PROTECTED] 
xmlns:xop=http://www.w3.org/2004/08/xop/include; /

 /tns:image
 tns:namey/tns:name
  /tns:initiateHelloWorld
   /soapenv:Body

/soapenv:Envelope--MIMEBoundaryurn_uuid_CC9B93F1D476A848F611476788200801content-id: 


1.urn:uuid:[EMAIL PROTECTED]content-type:image/jpegcontent-transfer-encoding:binary 


 and a lot of symbols...


Thilina Gunarathne wrote:
May be i can give you a helping hand if you u post the generated 
skeleton as well... I'm not sure wat's the param0. I'm not that 
familiar with data bounded MTOM skeletons :(...
Problem seems that you are not getting hold of the correct textNode 
with binary data.. Looking at the exception you are asking a 
DataHandler from a non-binary node..
 
You can use the TCPMON to see how your attachment is going... See 
whether it goes as a MIME part or as base64..
 
Thanks,

~Thilina
 
On 5/12/06, *Charles Souillard* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi all,

I am using Axis 2 1.0 on a Linux computer  for 2 weeks. I am 
using Sun

jdk1.5.0_06.
I am able to call a simple Helloworld WS using xmlbeans 
DataBinding.
I haven't modified axis2.xml configuration. Axis 2 web app is 
deployed

into my Tomcat 5.5.15.
I am now trying to add an attachment in the message I send to 
the WS.

My problem is to access the binary data received in the skeleton.
I made a test in the client to build the image with the same code
I use
in the skeleton and it is successfull.

You can find the code I use and the exception I get below.
Can you help me ?
I think I have only made a copy/paste from the MTOM guide
available in
the axis2 documentation.

Thanks a lot
Regards
Charles

I get the following exception :
ContentID is null
at

org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:339) 


at

org.apache.axis2.HelloWorldServiceBPSkeleton.initiate(HelloWorldServiceBPSkeleton.java:162) 


at

org.apache.axis2.HelloWorldServiceBPMessageReceiverInOut.invokeBusinessLogic(HelloWorldServiceBPMessageReceiverInOut.java 


:50)
at

org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) 


at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
at

org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest 


(HTTPTransportUtils.java:284)
at

org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136) 


at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service( HttpServlet.java:802)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 


at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java 


:173)
at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 


at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 


at
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 


at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 


at
org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at


Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Rodrigo Ruiz

Ok, don't worry, the more awful the more interesting :-D

The quick response for your problem is: it is not possible. A more 
detailed one could be: it is not possible without developing some custom 
Axis code. What you are trying to achieve is not easy, and I am afraid 
Axis implementation does not take it into account.


I will try to put you in context, so you can implement what you need.

Socket Creation
---

Socket creation is performed by an implementation of 
org.apache.axis.components.net.SocketFactory or 
org.apache.axis.components.net.SecureSocketFactory. The first is for 
HTTP requests, and the second for HTTPS ones. You must implement a 
custom implementation of these interfaces, and instruct Axis client 
classes to use them instead of the default ones.


Your implementation will have to include a constructor that receives a 
Hashtable as one of its parameters. This Hashtable is supposed to 
contain configuration options, and it is there where the local binding 
address for your socket should be looked up.


If you look at the DefaultSocketFactory Axis class, you will find that 
the actual creation and initialization of the socket is performed in a 
static method. This means that just subclassing is simply not enough. I 
recommend you to create a clone of this class on your package 
structure, and modify it to accommodate to your needs.


I pass you a java example of how a low-level socket can be created that 
binds to a specific local address at the end of this mail.


Transport Options
-

The Hashtable containing the SocketFactory configuration options is 
passed to the factory instance from the Transport handler. The actual 
class name can be viewed on the client-config.wsdd file, and it usually is:


transport name=http
   pivot=java:org.apache.axis.transport.http.HTTPSender/

So, in this case, replacing it by your own implementation is easier.

Mapping Services to Local Bind Addresses


You have several options, depending on your needs:

1) If you have a separate webapp per remote service, the local host name 
to be passed to your custom SocketFactory will be a single static value. 
In this case, you could add a parameter within the transport tag itself. 
Something like:


transport name=http ...
  parameter name=bind.host value=x.x.x.x/
/transport

This way, the value will be passed to your SocketFactory instance.

2) If you have a webapp having to speak to different remote services, 
you could try to create separate AxisClient instances, each one with a 
different configuration, so you can use a different instance for each 
remote service. For each configuration, the approach would be the same 
as the 1) scenario.


3) Implement a smart Socket Factory. If you can create a mapping 
between remote addresses and local bind addresses (something like a 
routing table), you could implement this mapping within your 
SocketFactory implementation. This mapping could be even configurable by 
specifying it as transport parameters, for example:


transport name=http ...
  parameter name=map:127.0.0.1 value=127.0.0.1/
  parameter name=map:remote-address value=10.33.5.67/
  ...
/transport

I recommend you the third option, as it is the more flexible one. If you 
do not add extra complexity, for example, allowing patterns in address 
mappings, the implementation can be really easy.


I think your scenario is quite reasonable so, could I suggest you to 
open a JIRA bug report on this? I would be glad to contribute on such an 
issue :-)


Regards,
Rodrigo


package org.rodrisoft;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.InetSocketAddress;
import java.net.Socket;

/**
 * Tests opening a socket through a specific local address.
 *
 * @author a href=mailto:[EMAIL PROTECTED]Rodrigo Ruiz Aguayo/a
 * @version 1.0
 */
public class LocalAddressSocketTest {

  /**
   * Main method.
   *
   * @param args Not used
   * @throws Exception If an error occurs
   */
  public static void main(String[] args) throws Exception {

String remoteHost = 127.0.0.1;
String localHost = 127.0.0.1;

switch (args.length) {
  case 2: remoteHost = args[1];
  case 1: localHost = args[0];
  default:
break;
}

Socket socket = new Socket();

try {
  socket.bind(new InetSocketAddress(localHost, 0));
  socket.connect(new InetSocketAddress(remoteHost, 8080));

  OutputStream os = socket.getOutputStream();
  PrintWriter out = new PrintWriter(os);
  out.println(GET /index.jsp HTTP/1.1);
  out.println(Host:  + remoteHost);
  out.println();
  out.println();
  out.flush();

  InputStream is = socket.getInputStream();
  BufferedReader in = new BufferedReader(new InputStreamReader(is));
  String line = in.readLine();
  while (line != null) {

[Axis2] Migration

2006-05-16 Thread ebaykunde
Hi,

I want to migrate to Axis 2 but it causes several problems for instance the
ant task and Handler classes:

1.)
target name=wsdl2java
codegen wsdlfilename=${local.wsdl}   
   serverside=true
   packagename=de.test
/codegen
/target

causes the following error message:
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found

2.)
What's equivalent to this from Axis 1.4:
axis-wsdl2java url=${local.wsdl}
output=${src}
testcase=true
deployscope=session
serverSide=true
skeletonDeploy=true
noimports=false
mapping
namespace=http://www.domainname.de/appname/;
 package=de.domainname.appname.webservice
/
/axis-wsdl2java

I don't understand how I can use the new namespacetopackages attribute (the
old mapping is not more allowed?!)?

3.) 
What is the code for the following Handler code snippet?
String userID = msgContext.getUsername();
String password = msgContext.getPassword();
String remoteIP = msgContext.getStrProp(Constants.MC_REMOTE_ADDR);

Thank you very much for your help!

Regards,
Ralph



Re: [Axis2] endpoint test, backward compatibilty and WSDL2Java

2006-05-16 Thread Ajith Ranabahu

Hi,
1. Axis2 services are not compatible with older versions. So you
cannot deploy services made for axis1x with axis2. we are thinking of
providing a converter but not in the foreseeable future :(

2. for the WSDL2Java batch file to execute you have to have it in the
path (and ofcourse the   AXIS2_HOME need to be set)

Ajith

On 5/16/06, Mérième N [EMAIL PROTECTED] wrote:



Hi,

I want to test a SOAP endpoint ot the Version like in Axis 1.3.

I type http://localhost:8080/axis2/services/version
or
http://localhost:8080/axis2/services/version?method=getVersion

the page displayed the following message:
Requested resource not found!

The link in order to generate the WSDL works.

However I follow step by step the guidelines in the installation guide. All
the other pages are displayed as expected.

An another question, I developed a Web Service under Axis 1.3. I wanted to
upload the jar files via the administaton site. This service is displayed as
a faulty service. In general, can Axis2 deployed a web service developed
under a previous version?

Can it have a backward compatibility?

I try to enforce the WSDL2Java command line advised in the user guide
WSDL2Java -uri ..\samples\wsdl\Axis2SampleDocLit.wsdl -ss
-sd -d xmlbeans
-o ..\samples -p org.apache.axis2.userguide

This error is displayed.
'WSDL2Java' is not recognized as an internal or external command,
operable program or batch file.

Do I have to call this tool in another way ?

Could you help me to fix that.

Thanking you in advance.
Merieme




--
Ajith Ranabahu


Re: [Axis2] Migration

2006-05-16 Thread robert lazarski
There is a migration guide that covers both Handlers and databinding: 

http://ws.apache.org/axis2/1_0/migration.html

I think most if not all of your questions are answered there. Anything that's left, just follow up and maybe we can help. 

One thing you'll need to solve is your classpath, as you'll need a
reference to all the jars under the std distro lib directory. There is
a full tutorial on ant in the codegen guide: 

http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html

HTH,
Robert
http://www.braziloutsource.com/
On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi,I want to migrate to Axis 2 but it causes several problems for instance theant task and Handler classes:1.)target name=wsdl2javacodegen
wsdlfilename=${local.wsdl}
serverside=true
packagename=de.test/codegen/targetcauses the following error message:javax.xml.stream.FactoryConfigurationError: Providercom.bea.xml.stream.MXParserFactory
 not found2.)What's equivalent to this from Axis 1.4:axis-wsdl2java
url="">output=${src}testcase=truedeployscope=session
serverSide=trueskeletonDeploy=truenoimports=falsemapping
namespace=http://www.domainname.de/appname/
package=de.domainname.appname.webservice//axis-wsdl2javaI don't understand how I can use the new namespacetopackages attribute (theold mapping is not more allowed?!)?
3.)What is the code for the following Handler code snippet?String userID = msgContext.getUsername();String password = msgContext.getPassword();String remoteIP = msgContext.getStrProp(Constants.MC_REMOTE_ADDR
);Thank you very much for your help!Regards,Ralph


Re: Attachment use in the WS skeleton

2006-05-16 Thread Thilina Gunarathne
Hi,
I can suggested three ways to access the binary content according to my choice priority.

1. I don't have a much of a knowledge in Data Bounded code. But if the data binding is properly handled for MTOM then there should be a getter for a Data Handler or a Byte[] in your helloworld.InitiateHelloWorldDocument
.. 

2. Regarding your server code, 
You can access the OMText object containing the Binary data from imageEle element by calling it's getFirstChild() method. Then you can call the getDataHandler() method of that OMText instance to get the DataHandler. This should work.


3.I don't understand why you are trying to access the attachments Map in the msgContext. This method is to use with SwA type attachments, though it should work even in this scenario(with loads of unnecessary overhead) . I noticed that you are setting the out message context in the setOperationContext method using 
WSDLConstants.MESSAGE_LABEL_OUT_VALUE. Try using LABEL_IN_VALUE.

I personally don't recommend the 3rd method to access MTOM attachments. It's lot easier than that. :)

HTH,
~Thilina


 for (Iterator it = payload.getChildElements();it.hasNext();) { OMElement el = (OMElement) 
it.next(); if (el.getLocalName().equalsIgnoreCase(image)) { imageEl = el; } else if (el.getLocalName().equalsIgnoreCase(name)) {
 nameEl = el; } } String out = initiateHelloWorldResponse xmlns=\urn:helloworld:bpel:bsoap\;
 out += result; try { OMElement xop = (OMElement)imageEl.getFirstOMChild(); OMAttribute attr = xop.getAttribute
(new QName(href)); out += \nattr = +attr; String contentID = attr.getAttributeValue(); out += \ncontentID = +contentID;
 Attachments attachment = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); out += \nattachment = +attachment; contentID = contentID.trim
(); if (contentID.substring(0, 3).equalsIgnoreCase(cid)) { contentID = contentID.substring(4); } DataHandler dataHandler = 
attachment.getDataHandler(contentID); out += \n dataHandler = +dataHandler; OMText textNode = new OMTextImpl(dataHandler, xop.getOMFactory()); 
imageEl.build(); xop.detach(); imageEl.addChild(textNode); OMText binaryNode = (OMText) xop.getFirstOMChild(); DataHandler dh = (DataHandler)binaryNode.getDataHandler();
 Image image = new ImageIO().loadImage(dh.getDataSource().getInputStream()); FileOutputStream imageOutStream = new FileOutputStream(/home/souillac/thinkAttachment.jpg);
 new ImageIO().saveImage(image/jpeg, image, imageOutStream); } catch (Exception e) { out += \ncatch : +getExceptionAsString(e);
 } out += /result; out += /initiateHelloWorldResponse; retDoc = InitiateHelloWorldResponseDocument.Factory.parse
(out); } catch (Exception e) { e.printStackTrace(); } return retDoc; } private String getExceptionAsString(Throwable ex) {
 String excep = \n+ex.getClass()+ : +ex.getMessage()+\n; while (ex != null) { StackTraceElement[] steTab = ex.getStackTrace(); for (int j=0;j
steTab.length;j++) { StackTraceElement ste = steTab[j]; excep += at  + ste.toString() + \n; } ex = ex.getCause
(); if (ex != null) { excep += caused by \n; } } return excep; } } 
 package helloworld; import java.awt.Image; import java.io.FileInputStream; import java.io.StringWriter; import javax.activation.DataHandler; import 
javax.xml.stream.XMLOutputFactory; import org.apache.axiom.attachments.utils.ImageDataSource; import org.apache.axiom.attachments.utils.ImageIO; import org.apache.axiom.om.OMAbstractFactory
; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axiom.om.OMText; import org.apache.axiom.soap.SOAP11Constants
; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; public class HelloWorldClient {
 private static EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/HelloWorldServiceBP
); public static void main(String[] args) { System.out.println(In Axis2 HelloWorld Client...); if (args.length != 1) { System.out.println
(You must specify one and only one argument); } else { try { callAXIOMWithAttachment(args[0]); } catch (Exception e) { 
e.printStackTrace(); } } } private static void callAXIOMWithAttachment(String name) throws Exception { OMFactory fac = OMAbstractFactory.getOMFactory
(); OMNamespace omNs = fac.createOMNamespace(urn:helloworld:bpel:bsoap, tns); OMElement payload = fac.createOMElement(initiateHelloWorld, omNs);
 //name OMElement nameEl = fac.createOMElement(name, omNs); nameEl.addChild(fac.createOMText(nameEl, name)); //image OMElement image = 
fac.createOMElement(image, omNs); FileInputStream fis = new FileInputStream(/home/souillac/divers/images/think.jpg); Image expectedImage = new ImageIO().loadImage(fis);
 ImageDataSource dataSource = new ImageDataSource(think.jpg,expectedImage); DataHandler expectedDH = new 

Re: [Axis2 1.0] NullPointerException at StAXOMBuilder.next() when using rampart

2006-05-16 Thread Reshef Roy


Hi Ruchith,

I've replaced all axiom jars, now I am getting through
:) Thanks a lot...
I still have problems with parsing the decrypted
server-client message, but I first have to verify
whether these are not a result of my own code /
configuration before I'll bother you guys again...

Thanks again,

/ Roy

--- Ruchith Fernando [EMAIL PROTECTED]
wrote:

 Hi Roy,
 
 Ah... an issue in packaging the jars... this will be
 fixed in the next
 AXIOM release:
 
 I hosted all three axiom jars (from svn revision
 406919) here : [1]
 
 Please try replacing all your axiom-* jars with
 these.
 
 Thanks
 Ruchith
 
 [1] http://people.apache.org/~ruchithf/axiom/
 
 On 5/16/06, Reshef Roy [EMAIL PROTECTED] wrote:
 
  Hi Ruchith,
 
  Thanks for the fast reaction. I've downloaded your
 new
  axiom-dom jar, however I still got the same
  exception...
  Then I removed the axiom-dom jar altogether (from
 both
  the client respository and the server), and I
 still
  got the very same exception (so no
  ClassNotFoundException...). Further investigation
  showed that the
  org.apache.axiom.om.impl.dom.CharacterImpl was
 used
  from the axiom-api-1.0.jar, NOT from the axiom-dom
  jar.  I unpacked both jars and compared them, it
 seems
  to me that the axiom-dom jar is actually a subset
 of
  the classes in the axiom-api jar. And all of these
  (except for
 org.apache.axiom.om.impl.dom.CharacterImpl
  and org.apache.axiom.om.impl.dom.TextImpl) were
  identical. I cannot imagine that it's meant to be
  so...
 
  I cannot remove the axiom-api-1.0.jar as the
 startup
  of Axis2 under Tomcat fails... I can try to mess
  around with the order in the classpath of both the
  client repository and the server, but I guess it
 would
  be easier (and better) to solve this duplication
 by
  either merging the two jars or removing the
 duplicate
  classes from the axiom-api jar.
 
  Thanks again,
 
  / Roy
 
 
  --- Ruchith Fernando [EMAIL PROTECTED]
  wrote:
 
   Hi Roy,
  
   Thank you for reporting this problem ... I
 traced
   the issue to the
   org.apache.axiom.om.impl.dom.CharacterImpl of
 the
   OM-DOM
   implementation (DOOM) and this is fixed in SVN
   revision : 406708
  
   Please replace your axiom-dom-1.0.jar with this
 [1]
   and try again.
  
   Thanks,
   Ruchith
  
   [1]
  
 

http://people.apache.org/~ruchithf/axiom-dom-406708.jar
  

[snip]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: [Axis2][1.0] RPCMessageReceiver and javabeans array

2006-05-16 Thread Davanum Srinivas

Kinichiro,

Please log a bug in JIRA and upload all the files.

thanks,
dims

On 5/16/06, Inoguchi, Kinichiro [EMAIL PROTECTED] wrote:

Hi,

I'm testing RPCMessageReceiver with java class
that receives array of javabeans and returns array of javabeans.

package test;
public class ArrayJavaBeans {
public testServiceOut [] testService(testServiceIn []
inParam) {
testServiceOut [] outParam = new
testServiceOut[inParam.length];
return outParam;
}
}

After deploy this service, I tried to generate proxy code from .NET,
but I got errors like these;

The document at the url
http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl was not
recognized as a known document type. The error message from each known
type may help you fix the problem:
- Report from 'WSDL Document' is 'There is an error in XML document (1,
490).'.
  - Invalid URI: The format of the URI could not be determined.
- Report from 'DISCO Document' is 'Discovery document at the URL
http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl could not be
found.'.
  - The document format is not recognized.
- Report from 'XML Schema' is 'Expected Schema root. Make sure that the
root element is schema and the namespace is
'http://www.w3.org/2001/XMLSchema' for an XSD schema or
'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error
occurred at , (1, 2).'.

It seems something wrong with WSDL generated by Axis2.

Does anyone know about this problem ?
Is there any way to avoid this trouble ?

I attached sourcecode, services.xml and generated wsdl.

Thanks,
kinichiro







--
Davanum Srinivas : http://wso2.com/blogs/


RE: [Axis2][1.0] RPCMessageReceiver and javabeans array

2006-05-16 Thread Inoguchi, Kinichiro
Dims, 

I did it, as AXIS2-742.

Thanks,
kinichiro

-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 16, 2006 10:44 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2][1.0] RPCMessageReceiver and javabeans array


Kinichiro,

Please log a bug in JIRA and upload all the files.

thanks,
dims

On 5/16/06, Inoguchi, Kinichiro [EMAIL PROTECTED] wrote:
 Hi,

 I'm testing RPCMessageReceiver with java class
 that receives array of javabeans and returns array of javabeans.

 package test;
 public class ArrayJavaBeans {
 public testServiceOut [] testService(testServiceIn []
 inParam) {
 testServiceOut [] outParam = new 
 testServiceOut[inParam.length];
 return outParam;
 }
 }

 After deploy this service, I tried to generate proxy code from .NET, 
 but I got errors like these;

 The document at the url 
 http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl was not 
 recognized as a known document type. The error message from each known

 type may help you fix the problem:
 - Report from 'WSDL Document' is 'There is an error in XML document 
 (1, 490).'.
   - Invalid URI: The format of the URI could not be determined.
 - Report from 'DISCO Document' is 'Discovery document at the URL 
 http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl could not be 
 found.'.
   - The document format is not recognized.
 - Report from 'XML Schema' is 'Expected Schema root. Make sure that 
 the root element is schema and the namespace is 
 'http://www.w3.org/2001/XMLSchema' for an XSD schema or 
 'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error 
 occurred at , (1, 2).'.

 It seems something wrong with WSDL generated by Axis2.

 Does anyone know about this problem ?
 Is there any way to avoid this trouble ?

 I attached sourcecode, services.xml and generated wsdl.

 Thanks,
 kinichiro






-- 
Davanum Srinivas : http://wso2.com/blogs/


[Axis2][1.0] RPCMessageReceiver and javabeans array

2006-05-16 Thread Inoguchi, Kinichiro
Hi,

I'm testing RPCMessageReceiver with java class 
that receives array of javabeans and returns array of javabeans.

package test;
public class ArrayJavaBeans {
public testServiceOut [] testService(testServiceIn []
inParam) {
testServiceOut [] outParam = new
testServiceOut[inParam.length];
return outParam;
}
}

After deploy this service, I tried to generate proxy code from .NET, 
but I got errors like these;

The document at the url
http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl was not
recognized as a known document type. The error message from each known
type may help you fix the problem:
- Report from 'WSDL Document' is 'There is an error in XML document (1,
490).'.
  - Invalid URI: The format of the URI could not be determined.
- Report from 'DISCO Document' is 'Discovery document at the URL
http://localhost:8080/axis2/services/ArrayJavaBeans?wsdl could not be
found.'.
  - The document format is not recognized.
- Report from 'XML Schema' is 'Expected Schema root. Make sure that the
root element is schema and the namespace is
'http://www.w3.org/2001/XMLSchema' for an XSD schema or
'urn:schemas-microsoft-com:xml-data' for an XDR schema. An error
occurred at , (1, 2).'.

It seems something wrong with WSDL generated by Axis2.

Does anyone know about this problem ?
Is there any way to avoid this trouble ?

I attached sourcecode, services.xml and generated wsdl.

Thanks,
kinichiro



ArrayJavaBeans.java
Description: ArrayJavaBeans.java


testServiceIn.java
Description: testServiceIn.java


testServiceOut.java
Description: testServiceOut.java
service name=ArrayJavaBeans
description
test service for ArrayJavaBeans.
/description
parameter name=ServiceClass locked=falsetest.ArrayJavaBeans/parameter
operation name=testService
messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/
/operation
/service

ArrayJavaBeans.wsdl
Description: ArrayJavaBeans.wsdl


Re: [Axis2] Migration

2006-05-16 Thread Ajith Ranabahu

Hi Ralph,
1. We've found that the Ant task needs the jars inside the ant lib
folder so the easiest solution will be to copy the axis2 lib into the
ant lib directory. do an ant -diagnostics and see whether ant has
picked up the classes just to be sure :)

2. Our ant task is somewhat primitive so it does not allow the
mappings to be nested as in the old ant task. As for the attribute
please include the string namespace=package seperated by commas.

example
codegen namespacetopackages=urn:myNamespace=org.me,http://myns=org.myns; /

We do understand that this needs to be improved. We'll soon improve
the ant task, to the user friendly level of the Axis1 ant task

3. oops ! we do not support getting the username,password through the
messagecontext directly. In the servlet case you'll need to access the
Constants.Configuration.TRANSPORT_IN_URL property in the message
context to get the request URL

HTH

Ajith


On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi,

I want to migrate to Axis 2 but it causes several problems for instance the
ant task and Handler classes:

1.)
target name=wsdl2java
codegen wsdlfilename=${local.wsdl}
   serverside=true
   packagename=de.test
/codegen
/target

causes the following error message:
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found

2.)
What's equivalent to this from Axis 1.4:
axis-wsdl2java url=${local.wsdl}
output=${src}
testcase=true
deployscope=session
serverSide=true
skeletonDeploy=true
noimports=false
mapping
namespace=http://www.domainname.de/appname/;
 package=de.domainname.appname.webservice
/
/axis-wsdl2java

I don't understand how I can use the new namespacetopackages attribute (the
old mapping is not more allowed?!)?

3.)
What is the code for the following Handler code snippet?
String userID = msgContext.getUsername();
String password = msgContext.getPassword();
String remoteIP = msgContext.getStrProp(Constants.MC_REMOTE_ADDR);

Thank you very much for your help!

Regards,
Ralph





--
Ajith Ranabahu


AW: [Axis2] Migration

2006-05-16 Thread ebaykunde








Thanks four your answer.

I have read the articles
again but it solves not my problems.













Von: robert lazarski
[mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 16. Mai 2006
15:35
An: axis-user@ws.apache.org
Betreff: Re: [Axis2] Migration





There is a migration
guide that covers both Handlers and databinding: 

http://ws.apache.org/axis2/1_0/migration.html

I think most if not all of your questions are answered there. Anything that's
left, just follow up and maybe we can help. 

One thing you'll need to solve is your classpath, as you'll need a reference to
all the jars under the std distro lib directory. There is a full tutorial on
ant in the codegen guide: 

http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html

HTH,
Robert
http://www.braziloutsource.com/



On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi,

I want to migrate to Axis 2 but it causes several problems for instance the
ant task and Handler classes:

1.)
target
name=wsdl2java
codegen
wsdlfilename=${local.wsdl}

serverside=true

packagename=de.test
/codegen
/target

causes the following error message:
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found

2.)
What's equivalent to this from Axis 1.4:
axis-wsdl2java
url="">
output=${src}
testcase=true
deployscope=session

serverSide=true
skeletonDeploy=true
noimports=false
mapping

namespace=http://www.domainname.de/appname/

package=de.domainname.appname.webservice
/
/axis-wsdl2java

I don't understand how I can use the new namespacetopackages attribute (the
old mapping is not more allowed?!)? 

3.)
What is the code for the following Handler code snippet?
String userID = msgContext.getUsername();
String password = msgContext.getPassword();
String remoteIP = msgContext.getStrProp(Constants.MC_REMOTE_ADDR
);

Thank you very much for your help!

Regards,
Ralph














Re: WSDL2Java w/ XMLBeans - not generating some source files

2006-05-16 Thread Throw Away
Due to some sensitivty with the WSDL, I had to change some naming, here it is:?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:tns=
http://ws.acme.com/service xmlns:payload=http://ws.acme.com/xsd targetNamespace=
http://ws.acme.com/service name=acmeService wsdl:types schema targetNamespace=http://ws.acme.com/service
 xmlns=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified import namespace=
http://ws.acme.com/xsd schemaLocation=acme.xsd/ import namespace=
http://ws.acme.com/xsd/acmelite/enterprise schemaLocation=acme_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite
 schemaLocation=acmeLite_TO_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite
 schemaLocation=acmeLite_TPO_export.xsd/ /schema /wsdl:types wsdl:message name=searchEventRequest wsdl:part name=request
 element=payload:EventSearchCriterion/ /wsdl:message wsdl:message name=searchEventResponse wsdl:part name=response element=payload:EventList/
 /wsdl:message wsdl:message name=getobjectiveByEventRequest wsdl:part name=request element=payload:objectiveSearchCriterion/
 /wsdl:message wsdl:message name=getobjectiveByEventResponse wsdl:part name=response element=payload:DATA/ /wsdl:message
 wsdl:portType name=port wsdl:operation name=searchEvent wsdl:input name=searchEventRequest message=tns:searchEventRequest/
 wsdl:output name=searchEventResponse message=tns:searchEventResponse/ /wsdl:operation wsdl:operation name=getobjectiveByEvent
 wsdl:input name=getobjectiveByEventRequest message=tns:getobjectiveByEventRequest/ wsdl:output name=getobjectiveByEventResponse
 message=tns:getobjectiveByEventResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=acmeServiceBinding type=tns:port
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=searchEvent
 soap:operation soapAction=searchEvent/ wsdl:input soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:input wsdl:output soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:output /wsdl:operation wsdl:operation name=getobjectiveByEvent soap:operation soapAction=getobjectiveByEvent/
 wsdl:input soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:input
 wsdl:output soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:output
 /wsdl:operation /wsdl:binding wsdl:service name=acmeService wsdl:port name=port binding=tns:acmeServiceBinding
 soap:address location=http://localhost:8080/acme/services/port/ /wsdl:port /wsdl:service
/wsdl:definitionsOn 5/15/06, robert lazarski [EMAIL PROTECTED] wrote:
Post your your entire wsdl and maybe we can help. There's been some
recent fixes for xmlbeans and I can try running your wsdl off of the
latest svn. I can't think off a vaild scenario where you wouldn't get a
document file by the supported styles doc / lit and
rpc / lit , though there might be. There's also the possibilty
that your wsdl explains the problem. 

HTH,
Robert
http://www.braziloutsource.com/
 On 5/15/06, Throw Away [EMAIL PROTECTED]
 wrote:
Hello,I am using the WSDL2Java command to generate some
java files with the XML Beans databinding. For some reason, some
classes that I expect to be generated don't come out. I have been using
Axis2 v 0.93 and am now upgrading to 1.0.Here is a snippet of my WSDL:xs:include schemaLocation=common.xsd/xs:element name=ExportData type=ExportDataType/
xs:complexType name=ExportDataType
 xs:sequence xs:element name=Header type=HeaderType/ xs:sequence xs:element name=Data type=DataType/ /xs:sequence
 /xs:sequence/xs:complexTypeIn the old version, I would get generated types forExportDataTypeExportDataDocumentHeaderType,and so on.But now, I get no class for ExportDataDocument among others.
Some type classes get generated, but not the document.This is the WSDL2Java I am calling from inside of ant: java classname=org.apache.axis2.wsdl.WSDL2Java failonerror=true fork=true
 classpathref=ws.classpath arg line=-uri ${wsdl.location}/ arg line=-ss/ arg line=-sd/
 arg line=-d xmlbeans/ arg line=-o ${generated.dir}/arg line=-g/ /javaAny help would be greatly appreciated.







Re: WSDL2Java w/ XMLBeans - not generating some source files

2006-05-16 Thread robert lazarski
Going to need any schemas you have, such as acme.xsd . 

Robert
http://www.braziloutsource.com/
On 5/16/06, Throw Away [EMAIL PROTECTED] wrote:
Due to some sensitivty with the WSDL, I had to change some naming, here it is:?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:wsdl=

http://schemas.xmlsoap.org/wsdl/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema
 xmlns:tns=
http://ws.acme.com/service xmlns:payload=http://ws.acme.com/xsd targetNamespace=

http://ws.acme.com/service name=acmeService wsdl:types schema targetNamespace=
http://ws.acme.com/service
 xmlns=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified
 import namespace=
http://ws.acme.com/xsd
schemaLocation=acme.xsd/ import namespace=
http://ws.acme.com/xsd/acmelite/enterprise
schemaLocation=acme_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite

schemaLocation=acmeLite_TO_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite


schemaLocation=acmeLite_TPO_export.xsd/ /schema /wsdl:types wsdl:message name=searchEventRequest wsdl:part name=request

element=payload:EventSearchCriterion/ /wsdl:message wsdl:message name=searchEventResponse wsdl:part name=response element=payload:EventList/
 /wsdl:message wsdl:message name=getobjectiveByEventRequest wsdl:part name=request
element=payload:objectiveSearchCriterion/
 /wsdl:message wsdl:message name=getobjectiveByEventResponse wsdl:part name=response element=payload:DATA/ /wsdl:message
 wsdl:portType name=port wsdl:operation name=searchEvent wsdl:input name=searchEventRequest
message=tns:searchEventRequest/
 wsdl:output name=searchEventResponse
message=tns:searchEventResponse/ /wsdl:operation wsdl:operation name=getobjectiveByEvent
 wsdl:input name=getobjectiveByEventRequest
message=tns:getobjectiveByEventRequest/ wsdl:output name=getobjectiveByEventResponse

message=tns:getobjectiveByEventResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=acmeServiceBinding type=tns:port
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http
/ wsdl:operation name=searchEvent
 soap:operation soapAction=searchEvent/ wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:input wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:output /wsdl:operation wsdl:operation name=getobjectiveByEvent soap:operation soapAction=getobjectiveByEvent/
 wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:input
 wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:output
 /wsdl:operation /wsdl:binding wsdl:service name=acmeService wsdl:port name=port
binding=tns:acmeServiceBinding
 soap:address location=http://localhost:8080/acme/services/port/
 /wsdl:port /wsdl:service
/wsdl:definitionsOn 5/15/06, robert lazarski 
[EMAIL PROTECTED] wrote:
Post your your entire wsdl and maybe we can help. There's been some
recent fixes for xmlbeans and I can try running your wsdl off of the
latest svn. I can't think off a vaild scenario where you wouldn't get a
document file by the supported styles doc / lit and
rpc / lit , though there might be. There's also the possibilty
that your wsdl explains the problem. 

HTH,
Robert
http://www.braziloutsource.com/
 On 5/15/06, Throw Away [EMAIL PROTECTED]
 wrote:
Hello,I am using the WSDL2Java command to generate some
java files with the XML Beans databinding. For some reason, some
classes that I expect to be generated don't come out. I have been using
Axis2 v 0.93 and am now upgrading to 1.0.Here is a snippet of my WSDL:xs:include schemaLocation=common.xsd/xs:element name=ExportData type=ExportDataType/
xs:complexType name=ExportDataType
 xs:sequence xs:element name=Header type=HeaderType/ xs:sequence xs:element name=Data type=DataType/ /xs:sequence
 /xs:sequence/xs:complexTypeIn the old version, I would get generated types forExportDataTypeExportDataDocumentHeaderType,and so on.But now, I get no class for ExportDataDocument among others.
Some type classes get generated, but not the document.This is the WSDL2Java I am calling from inside of ant: java classname=org.apache.axis2.wsdl.WSDL2Java failonerror=true fork=true
 classpathref=ws.classpath arg line=-uri ${wsdl.location}/ arg line=-ss/ arg line=-sd/
 arg line=-d xmlbeans/ arg line=-o ${generated.dir}/arg line=-g/ /javaAny help would be greatly appreciated.









Re: Select the output-network-interface to call an axis-webservice

2006-05-16 Thread Rodrigo Ruiz
CommonsHTTPSender is easier to subclass and modify. I pass you a simple 
subclass that could do the trick :-)


HTH,
Rodrigo



package org.rodrisoft;

import java.io.FileInputStream;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.URL;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

import org.apache.axis.MessageContext;
import org.apache.axis.transport.http.CommonsHTTPSender;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;

/**
 * Sender implementation that uses Jakarta Commons HTTP for 
transmission, and
 * implements a routing map table to select a local address depending 
on the

 * remote address to connect to.
 * p
 * This sender can be configured in the client-config.wsdd file like this:
 * pre
 * lt;transport name=http
 *   pivot=java:org.rodrisoft.RoutedCommonsHTTPSender
 *   lt;parameter name=map-file value=path/to/map/file.properties/
 *   lt;parameter name=map:remote-addr value=10.33.5.67/
 * lt;/transport
 * /pre
 * p
 * The first parameter specifies a .properties file containing pairs in
 * the form:
 *
 * pre
 *   remote-addr=remote-addr
 * /pre
 *
 * The second parameter is an example of how to specify a single route
 * table entry directly in the .wsdd file.
 * p
 * The first parameter allows to share the route table among several
 * protocols.
 * p
 * The local binding address can also be specified through the message
 * context. This allows services and handlers set the local address, and
 * provide smarter routing algorithms.
 * p
 * Original work from Davanum Srinivas.
 *
 * @author Davanum Srinivas ([EMAIL PROTECTED])
 * @author Rodrigo Ruiz ([EMAIL PROTECTED])
 * @version 1.0
 */
public class RoutedCommonsHTTPSender extends CommonsHTTPSender {

  /**
   * codeserialVersionUID/code attribute.
   */
  private static final long serialVersionUID = -8610352356067978620L;

  /**
   * MessageContext Property name for setting the local bind address.
   */
  public static final String LOCAL_BIND_ADDRESS = local.bind.address;

  /**
   * Local Bind Address Route Map.
   */
  private final Map routeTable = new HashMap();

  /**
   * Flag that controls bindMap synchronization.
   */
  private boolean dirty = true;

  public synchronized void setOption(String name, Object value) {
this.dirty = true;
super.setOption(name, value);
  }

  public synchronized boolean setOptionDefault(String name,
   Object value) {
this.dirty = true;
return super.setOptionDefault(name, value);
  }

  public synchronized void setOptions(Hashtable options) {
this.dirty = true;
super.setOptions(options);
  }

  protected HostConfiguration getHostConfiguration(HttpClient client,
  MessageContext context, URL targetURL) {

HostConfiguration config = super.getHostConfiguration(client,
  context,
  targetURL);

if (targetURL != null) {
  String remoteHost = targetURL.getHost();
  InetAddress localAddr = getRouteFor(context, remoteHost);
  if (localAddr != null) {
config.setLocalAddress(localAddr);
  }
}

return config;
  }

  /**
   * This utility method allows to force the route table to be rebuilt.
   * It can be useful if the route table file is modified, and we can
   * manage to get the instance of this handler.
   */
  public void rebuildTable() {
this.dirty = true;
  }

  /**
   * Gets a route for the specified remote address, allowing it to be
   * specified through a Message Context parameter.
   *
   * @param ctx   The message context
   * @param host  The remote host to map
   * @return  The mapped address, or null if none found
   */
  protected InetAddress getRouteFor(MessageContext ctx, String host) {
Object value = ctx.getProperty(LOCAL_BIND_ADDRESS);
if (value instanceof InetAddress) {
  return (InetAddress)value;
}

if (value != null) {
  String hostName = value.toString();
  try {
return InetAddress.getByName(hostName);
  } catch (Exception e) {
log.error(Could not resolve local bind address  + hostName);
  }
}

// No value defined in the MessageContext. Use route map.

value = getRouteTable().get(host);
if (value instanceof InetAddress) {
  return (InetAddress)value;
}

if (value != null) {
  String hostName = value.toString();
  try {
return InetAddress.getByName(hostName);
  } catch (Exception e) {
log.error(Could not resolve local bind address  + hostName);
  }
}

return null;
  }

  /**
   * Gets the route mapping table.
   *
   * @return The route mapping table
   */
  protected synchronized Map getRouteTable() {
if (dirty) {
  routeTable.clear();

  Hashtable 

AW: [Axis2] Migration

2006-05-16 Thread ebaykunde
Hi,

your answer helped me a lot. Thanks!!

 1. We've found that the Ant task needs the jars inside the ant lib
 folder so the easiest solution will be to copy the axis2 lib into the
 ant lib directory. do an ant -diagnostics and see whether ant has
 picked up the classes just to be sure :)
I use Eclipse, so I had added the libraries in Preferences | Ant | Runtime |
Classpath and now it works. I don't understand why this is now necessary
because in Axis 1 this was not needed.

 2. Our ant task is somewhat primitive so it does not allow the
 mappings to be nested as in the old ant task. As for the attribute
 please include the string namespace=package seperated by commas.
 
 example
  codegen
 namespacetopackages=urn:myNamespace=org.me,http://myns=org.myns; /
This works for me.

 We do understand that this needs to be improved. We'll soon improve
 the ant task, to the user friendly level of the Axis1 ant task
Do you know approximately the next release date?

 3. oops ! we do not support getting the username,password through the
 messagecontext directly. In the servlet case you'll need to access the
 Constants.Configuration.TRANSPORT_IN_URL property in the message
 context to get the request URL
I can't follow you in this point. Do you mean it is not possible to get
username, password and IP address in an Axis 2 Handler class. In Axis 1.2.4
I used this to implement logging and authentication. I really need this
feature.

Regards,
Ralph



Asking help ! Found JAXP implementation ( javax.xml.parsers.SAXParserFactory ) at an unknown location?

2006-05-16 Thread Jenny ZHANG
Hey all,

I installed and run  AXIS1.4  over TOMCAT5.5.17/ WIN2K + JRE1.5 , got the 
following message when validating with Happyaxis.jsp


Found JAXP implementation ( javax.xml.parsers.SAXParserFactory ) at an unknown 
location
Found Java Secure Socket Extension ( javax.net.ssl.SSLSocketFactory ) at an 
unknown location

how can I fix the problem   does this matter to the development of web 
applications?
I only upgraded the JRE to 1.5 only (I had a full JDK 1.4.2 installed before) , 
should I install the full JDK 1.5 ? 
  
 
Thanks in advance, 

Jenny
2006-05-16


--
Axis Happiness Page
 
Examining webapp configuration

Needed Components
Found SAAJ API ( javax.xml.soap.SOAPMessage ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\saaj.jar
Found JAX-RPC API ( javax.xml.rpc.Service ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\jaxrpc.jar
Found Apache-Axis ( org.apache.axis.transport.http.AxisServlet ) at 
C:\Apache\Tomcat 5.5\webapps\axis\WEB-INF\lib\axis.jar
Found Jakarta-Commons Discovery ( org.apache.commons.discovery.Resource ) at 
C:\Apache\Tomcat 5.5\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar
Found Jakarta-Commons Logging ( org.apache.commons.logging.Log ) at 
C:\Apache\Tomcat 5.5\bin\commons-logging-api.jar
Found Log4j ( org.apache.log4j.Layout ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar
Found IBM's WSDL4Java ( com.ibm.wsdl.factory.WSDLFactoryImpl ) at 
C:\Apache\Tomcat 5.5\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar
Found JAXP implementation ( javax.xml.parsers.SAXParserFactory ) at an unknown 
location
Found Activation API ( javax.activation.DataHandler ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\activation.jar


Optional Components
Found Mail API ( javax.mail.internet.MimeMessage ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\mail.jar
Found XML Security API ( org.apache.xml.security.Init ) at C:\Apache\Tomcat 
5.5\webapps\axis\WEB-INF\lib\xmlsec-1.3.0.jar
Found Java Secure Socket Extension ( javax.net.ssl.SSLSocketFactory ) at an 
unknown location

The core axis libraries are present.The optional components are present.



Examining Application Server
Servlet version 2.4 
XML Parser org.apache.xerces.jaxp.SAXParserImpl 
XML ParserLocation C:\Apache\Tomcat 5.5\webapps\axis\WEB-INF\lib\xercesImpl.jar 




F1- Not getting complete exception-data in JaxRpc Client.

2006-05-16 Thread Manisha Mauni
Hello,
I am working on axis-1_3.

My web service throws a user exception which contains an array
(messageList) of objects of some user defined class (ValidationMessage).
--
The exception looks like.

public class MyException extends Exception {
private String message;
private test.ValidationMessage[] messageList;
private String type;
.
.
.
.
--

In an Axis-Client I am able to get the array (messageList)
but when I use JaxRpc client the array (messageList) is always null. 

I am not able to figure out where the array is getting dropped as I am
getting the other data (message and type).

I'll appreciate any help on it.

rgds
Manish


Re: Attachment use in the WS skeleton

2006-05-16 Thread Charles Souillard

Thank you !!!
using LABEL_IN_VALUE is coreect !!
Then in my client file, I only have to perform the following code and 
the image is created on my hard disk !


   OMElement xop = (OMElement)imageEl.getFirstOMChild();
   OMAttribute attr = xop.getAttribute(new QName(href));
   String contentID = attr.getAttributeValue();
   Attachments attachment = (Attachments) 
msgcts.getProperty(MTOMConstants.ATTACHMENTS);

   contentID = contentID.trim();
   if (contentID.substring(0, 3).equalsIgnoreCase(cid)) {
   contentID = contentID.substring(4);
   }
   DataHandler dataHandler = 
attachment.getDataHandler(contentID);


   Image image = new 
ImageIO().loadImage(dataHandler.getDataSource().getInputStream());
   FileOutputStream imageOutStream = new 
FileOutputStream(/home/souillac/thinkAttachment.jpg);
   new ImageIO().saveImage(image/jpeg, image, 
imageOutStream);


Thanks again,
Regards,
Charles

Thilina Gunarathne wrote:

Hi,
I can suggested three ways to access the binary content according to 
my choice priority.
 
1. I don't have a much of a knowledge in Data Bounded code. But if the 
data binding is properly handled for MTOM then there should be a 
getter for a Data Handler or a Byte[] in your 
helloworld.InitiateHelloWorldDocument ..
 
2. Regarding your server code,
You can access the OMText object containing the Binary data from 
imageEle element by calling it's getFirstChild() method. Then you can 
call the getDataHandler() method of that OMText instance to get the 
DataHandler.  This should work.
 
3.I don't understand why you are trying to access the attachments Map 
in the msgContext. This method is to use with SwA type attachments, 
though it should work even in this scenario(with loads of unnecessary 
overhead) .  I noticed that you are setting the out message context in 
the setOperationContext method using 
WSDLConstants.MESSAGE_LABEL_OUT_VALUE. Try using LABEL_IN_VALUE.
 
I personally don't recommend the 3rd method to access MTOM 
attachments. It's lot easier than that. :)
 
HTH,

~Thilina

 


 for (Iterator it =
payload.getChildElements();it.hasNext();) {
 OMElement el = (OMElement) it.next();
 if (el.getLocalName().equalsIgnoreCase(image)) {
 imageEl = el;
 } else if
(el.getLocalName().equalsIgnoreCase(name)) {
 nameEl = el;
 }
 }

 String out = initiateHelloWorldResponse
xmlns=\urn:helloworld:bpel:bsoap\;
 out += result;

 try {
 OMElement xop =
(OMElement)imageEl.getFirstOMChild();

 OMAttribute attr = xop.getAttribute (new
QName(href));
 out += \nattr = +attr;
 String contentID = attr.getAttributeValue();
 out += \ncontentID = +contentID;
 Attachments attachment = (Attachments)
msgcts.getProperty(MTOMConstants.ATTACHMENTS);
 out += \nattachment = +attachment;
 contentID = contentID.trim ();

 if (contentID.substring(0,
3).equalsIgnoreCase(cid)) {
 contentID = contentID.substring(4);
 }
 DataHandler dataHandler =
attachment.getDataHandler(contentID);
 out += \n dataHandler = +dataHandler;
 OMText textNode = new OMTextImpl(dataHandler,
xop.getOMFactory());
 imageEl.build();
 xop.detach();
 imageEl.addChild(textNode);

 OMText binaryNode = (OMText) xop.getFirstOMChild();

 DataHandler dh =
(DataHandler)binaryNode.getDataHandler();
 Image image = new
ImageIO().loadImage(dh.getDataSource().getInputStream());
 FileOutputStream imageOutStream = new
FileOutputStream(/home/souillac/thinkAttachment.jpg);
 new ImageIO().saveImage(image/jpeg, image,
imageOutStream);

 } catch (Exception e) {
 out += \ncatch : +getExceptionAsString(e);
 }

 out += /result;
 out += /initiateHelloWorldResponse;
 retDoc =
InitiateHelloWorldResponseDocument.Factory.parse (out);
 } catch (Exception e) {
 e.printStackTrace();
 }
 return retDoc;
 }

 private String getExceptionAsString(Throwable ex) {
 String excep = \n+ex.getClass()+ :
+ex.getMessage()+\n;
 while (ex != null) {
 StackTraceElement[] steTab = ex.getStackTrace();
 

Web Services Security

2006-05-16 Thread Santunu Podder
Hi all,

I am using Axis 1.4 for building my java web services. The client will be 
in .Net

Could anyone please advice me the best way of achieving the security. I 
have read about public and private keys but has 
anyone already implemented it for web services? 

In that case, can anyone please give me a pointer so that I can get some 
direction to implement it.

Thanks in advance,
Santunu


This message (including any attachments) is confidential and may be privileged. 
If you have received it by mistake please notify the sender by return e-mail 
and delete this message from your system. Any unauthorised use or dissemination 
of this message in whole or in part is strictly prohibited. Please note that 
e-mails are susceptible to change. Close Premium Finance shall not be liable 
for the improper or incomplete transmission of the information contained in 
this communication nor for any delay in its receipt or damage to your system. 
Close Premium Finance does not guarantee that the integrity of this 
communication has been maintained nor that this communication is free of 
viruses, interceptions or interference.


use axis2/c with own xml serializer

2006-05-16 Thread Will Hua Zheng
I wrote my xml serializer with xerces-c. How do I put that in a soap 
call without using OM?


- Will


use axis2/c with own xml serializer

2006-05-16 Thread Will Hua Zheng
I wrote my xml serializer with xerces-c. How do I put that in a soap 
call without using OM?


- Will


Re : [Axis2] endpoint test, backward compatibilty and WSDL2Java

2006-05-16 Thread Mérième N
Hi,Thanks for your advice!I try again to enforce the WSDL2Java command line.My first value of AXIS2_HOME is C:\axis2-std-1.0-src.It displayed me this errorThe AXIS2_HOME environment variable is not defined correctlyThis environment variable is needed to run this programI modified the path of my AXIS2_HOME variable to C:\axis2-std-1.0-src\target\temp\warApparently, the WSDL2Java.bat seeks an Axis2_home containing a lib directory.When I try again to enforce the WSDL2Java command line:WSDL2Java -uri Ask.wsdl
 -ss -sd -d xmlbeans -o . -p tutu
Now, I have this errors message displayed :Using AXIS2_HOME: C:\axis2-std-1.0-src\target\temp\warUsing JAVA_HOME: C:\Program Files\Java\jdk1.5.0_06Exception in thread "main" java.lang.NoClassDefFoundError: javax/wsdl/WSDLException at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) at
 org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)I put the xbean-2.1.0 jar file in the diretory lib located in AXIS2_HOME but no change.I still have problems with the test of a SOAP endpoint via an URL like in Axis1.3?Could you help me?Thanking you in advanceRegards,Merieme- Message d'origine De : Ajith Ranabahu [EMAIL PROTECTED]À : axis-user@ws.apache.org; Mérième N [EMAIL PROTECTED]Envoyé le : Mardi, 16 Mai 2006, 9h33mn 47sObjet: Re: [Axis2] endpoint test, backward compatibilty and WSDL2JavaHi,1. Axis2 services are not compatible with older versions. So youcannot deploy services made for axis1x with axis2. we are thinking ofproviding a converter but not in the foreseeable future :(2. for the WSDL2Java batch file to execute you have to have it in thepath (and ofcourse the AXIS2_HOME need to be
 set)AjithOn 5/16/06, Mérième N [EMAIL PROTECTED] wrote: Hi, I want to test a SOAP endpoint ot the Version like in Axis 1.3. I type http://localhost:8080/axis2/services/version or http://localhost:8080/axis2/services/version?method=getVersion the page displayed the following message: Requested resource not found! The link in order to generate the WSDL works. However I follow step by step the guidelines in the installation guide. All the other pages are displayed as expected. An another question, I developed a Web Service under Axis 1.3. I wanted to upload the jar files via the administaton site. This service is displayed
 as a faulty service. In general, can Axis2 deployed a web service developed under a previous version? Can it have a backward compatibility? I try to enforce the WSDL2Java command line advised in the user guide WSDL2Java -uri ..\samples\wsdl\Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans -o ..\samples -p org.apache.axis2.userguide This error is displayed. 'WSDL2Java' is not recognized as an internal or external command, operable program or batch file. Do I have to call this tool in another way ? Could you help me to fix that. Thanking you in advance. Merieme-- Ajith Ranabahu

[Axis2] handler question

2006-05-16 Thread Michele Mazzucco
Hi all,

is it possible for the handler to exchange some information with a
service or are they completely separate (i.e. two different entities)?
If yes, can anybody give me more details, please?


Thanks,
Michele


Re: WSE 817 error - bad wsdl or just newbie stupidity?

2006-05-16 Thread James Gough
I was able to solve this by adding in a SOAP Header for the To: that 
they were looking for (I was lucky enough to have a working .NET 
example, so basically I just mimicked the xml produced by that 
application as best I could).  Of course now I get a 400 error, but 
there's alot more to send them so I am unstuck by this error anyway.


Code to add the To: header:

 org.apache.axis.message.SOAPHeaderElement element = new 
org.apache.axis.message.SOAPHeaderElement(http://schemas.xmlsoap.org/ws/2004/03/addressing;, 
To);

 element.setPrefix(wsa);
 element.setAttribute(wsu:Id, Id- + idGenerator.nextUUID());
 element.setObjectValue(urn:AWordICannotFindAnywhereInMyCode);
 _call.addHeader(element);

Jim


Anne Thomas Manes wrote:
So you should tell the folks that built the service that they should 
define a more reasonable Actor attribute. To make it easier for 
consumers, the Actor attribute should be the same as the service 
endpoint URL.


The wsa:To value specifies the destination property, which is a URI 
that represents the Actor to whom the request is targeted -- not the 
physical location of the service. (The physical location may change, 
after all.)


Based on your error message, you should specify the destination 
property as urn:AWordICannotFindAnywhereInMyCode.


Anne




[Axis2] Securing ServiceClient tutorial class

2006-05-16 Thread Raghbir Singh

Hello,
   I was trying to find ways I could secure the Code Generated Stub 
classes. I search through all Rampart tutorials but could not find any 
information how I can sign the outgoing message programmatically.
   I shall be thankful for any information on using Rampart 
programmatically with Code Generated (WSDL2Java generated) Axis2 
Client Stubs.

   Thanks a lot,
Raghbir Singh



Re: WSDL2Java w/ XMLBeans - not generating some source files

2006-05-16 Thread Throw Away
it looks like there is some issue with using an xs:include in the schema's i reference.Are there any known issues with that?If I take the included schema and copy/paste it so i just have one schema w/ no includes, then the code is generated correctly.
On 5/16/06, robert lazarski [EMAIL PROTECTED] wrote:
Going to need any schemas you have, such as acme.xsd . 

Robert
http://www.braziloutsource.com/
On 5/16/06, Throw Away 
[EMAIL PROTECTED] wrote:
Due to some sensitivty with the WSDL, I had to change some naming, here it is:?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:wsdl=


http://schemas.xmlsoap.org/wsdl/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema
 xmlns:tns=
http://ws.acme.com/service xmlns:payload=http://ws.acme.com/xsd targetNamespace=

http://ws.acme.com/service name=acmeService wsdl:types schema targetNamespace=

http://ws.acme.com/service
 xmlns=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified
 import namespace=
http://ws.acme.com/xsd
schemaLocation=acme.xsd/ import namespace=
http://ws.acme.com/xsd/acmelite/enterprise
schemaLocation=acme_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite

schemaLocation=acmeLite_TO_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite


schemaLocation=acmeLite_TPO_export.xsd/ /schema /wsdl:types wsdl:message name=searchEventRequest wsdl:part name=request

element=payload:EventSearchCriterion/ /wsdl:message wsdl:message name=searchEventResponse wsdl:part name=response element=payload:EventList/
 /wsdl:message wsdl:message name=getobjectiveByEventRequest wsdl:part name=request
element=payload:objectiveSearchCriterion/
 /wsdl:message wsdl:message name=getobjectiveByEventResponse wsdl:part name=response element=payload:DATA/ /wsdl:message
 wsdl:portType name=port wsdl:operation name=searchEvent wsdl:input name=searchEventRequest
message=tns:searchEventRequest/
 wsdl:output name=searchEventResponse
message=tns:searchEventResponse/ /wsdl:operation wsdl:operation name=getobjectiveByEvent
 wsdl:input name=getobjectiveByEventRequest
message=tns:getobjectiveByEventRequest/ wsdl:output name=getobjectiveByEventResponse

message=tns:getobjectiveByEventResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=acmeServiceBinding type=tns:port
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http
/ wsdl:operation name=searchEvent
 soap:operation soapAction=searchEvent/ wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:input wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:output /wsdl:operation wsdl:operation name=getobjectiveByEvent soap:operation soapAction=getobjectiveByEvent/
 wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:input
 wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:output
 /wsdl:operation /wsdl:binding wsdl:service name=acmeService wsdl:port name=port
binding=tns:acmeServiceBinding
 soap:address location=http://localhost:8080/acme/services/port/
 /wsdl:port /wsdl:service
/wsdl:definitionsOn 5/15/06, robert lazarski 

[EMAIL PROTECTED] wrote:
Post your your entire wsdl and maybe we can help. There's been some
recent fixes for xmlbeans and I can try running your wsdl off of the
latest svn. I can't think off a vaild scenario where you wouldn't get a
document file by the supported styles doc / lit and
rpc / lit , though there might be. There's also the possibilty
that your wsdl explains the problem. 

HTH,
Robert
http://www.braziloutsource.com/
 On 5/15/06, Throw Away [EMAIL PROTECTED]
 wrote:
Hello,I am using the WSDL2Java command to generate some
java files with the XML Beans databinding. For some reason, some
classes that I expect to be generated don't come out. I have been using
Axis2 v 0.93 and am now upgrading to 1.0.Here is a snippet of my WSDL:xs:include schemaLocation=common.xsd/xs:element name=ExportData type=ExportDataType/
xs:complexType name=ExportDataType
 xs:sequence xs:element name=Header type=HeaderType/ xs:sequence xs:element name=Data type=DataType/ /xs:sequence
 /xs:sequence/xs:complexTypeIn the old version, I would get generated types forExportDataTypeExportDataDocumentHeaderType,and so on.But now, I get no class for ExportDataDocument among others.
Some type classes get generated, but not the document.This is the WSDL2Java I am calling from inside of ant: java classname=org.apache.axis2.wsdl.WSDL2Java failonerror=true fork=true
 classpathref=ws.classpath arg line=-uri ${wsdl.location}/ arg line=-ss/ arg line=-sd/
 arg line=-d xmlbeans/ arg line=-o ${generated.dir}/arg line=-g/ /javaAny help would be greatly appreciated.











Re: [Axis2] handler question

2006-05-16 Thread Deepal Jayasinghe
Hi Michele;
Well you can do that. You can set property into message context by
handlers and you can use them inside service impl class. In the same
time you can set property into message context by service impl class and
access them inside handlers.

To have this you have to add following method in to serviceimpl class to
get access to message context
  setOperationContext(OperationContext opctx){
// you can get message context from opctx
  }

Michele Mazzucco wrote:

Hi all,

is it possible for the handler to exchange some information with a
service or are they completely separate (i.e. two different entities)?
If yes, can anybody give me more details, please?


Thanks,
Michele


  


-- 
Thanks,
Deepal

~Future is Open~ 




Re: [Axis2] Securing ServiceClient tutorial class

2006-05-16 Thread Ali Sadik Kumlali
Hi Raghbir,

I hope following steps would help:
- WSDL2Java can also generate test client. You may use them.
- You should create a client_repo folder similar to the security sample
found under ...\axis2\samples\security\
- When running your test client, you need to pass
-Daxis2.repo=client_repo parameter.

Regards,

Ali Sadik Kumlali

--- Raghbir Singh [EMAIL PROTECTED] wrote:

 Hello,
 I was trying to find ways I could secure the Code Generated Stub
 
  classes. I search through all Rampart tutorials but could not find
 any 
  information how I can sign the outgoing message programmatically.
 I shall be thankful for any information on using Rampart 
  programmatically with Code Generated (WSDL2Java generated) Axis2 
  Client Stubs.
 Thanks a lot,
  Raghbir Singh
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: [Axis2] Securing ServiceClient tutorial class

2006-05-16 Thread Raghbir Singh

Thanks Ali,
   But I am looking for a way to do that inside the Java Program 
itself. I found that there are classes to add WS-Security extensions in 
WSS4J but they all expect w3c.Document object and Axis2 works with Axiom 
model. So the basic problem is to do it inside the program itself.

   Anyways, thanks so much for replying.
Raghbir Singh

Ali Sadik Kumlali said the following on 05/16/06 15:24:

Hi Raghbir,

I hope following steps would help:
- WSDL2Java can also generate test client. You may use them.
- You should create a client_repo folder similar to the security sample
found under ...\axis2\samples\security\
- When running your test client, you need to pass
-Daxis2.repo=client_repo parameter.

Regards,

Ali Sadik Kumlali

--- Raghbir Singh [EMAIL PROTECTED] wrote:

  

Hello,


   I was trying to find ways I could secure the Code Generated Stub
  
classes. I search through all Rampart tutorials but could not find
  
any 


information how I can sign the outgoing message programmatically.
   I shall be thankful for any information on using Rampart 
programmatically with Code Generated (WSDL2Java generated) Axis2 
Client Stubs.

   Thanks a lot,
Raghbir Singh

  



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
  


maven2 packaging, archetype, etc for axis2?

2006-05-16 Thread B R
Hi,

does anybody know of any maven2 support for developing web services using Axis2? 

Thanks,
Bhaskar


Error logging into Axis2(v1.0) admin console

2006-05-16 Thread Andrew Cohen








Hi all,





I'm a newbie to Axis2 and
I'm unable to login to the administration console (see the exception below). I
am running JDK 1.5.0_06 and have deployed the axis2.war file to a Jetty v5.1.5
server. I followed the instructions to change the java.security file for Java
1.5.





Any help would be greatly
appreciated! :-)





Exception details (after
logging in as admin/axis2):





- Error dispatching request
/SemandexWebServices/axis2-admin/login



java.lang.reflect.InvocationTargetException



 at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



 at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)



 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)



 at
java.lang.reflect.Method.invoke(Unknown Source)



 at

org.apache.axis2.transport.http.AbstractAgent.handle(AbstractAgent.ja



va:77)



 at

org.apache.axis2.transport.http.AdminAgent.handle(AdminAgent.java:93)







 at

org.apache.axis2.transport.http.AxisAdminServlet.doGet(AxisAdminServl



et.java:41)



 at

org.apache.axis2.transport.http.AxisAdminServlet.doPost(AxisAdminServ



let.java:35)



 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:616)



 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)



 at

org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427



)



 at

org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati



onHandler.java:473)



 at

org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5



68)



 at
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)



 at

org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication



Context.java:635)



 at
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)



 at
org.mortbay.http.HttpServer.service(HttpServer.java:954)



 at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)



 at

org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)



 at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)



 at

org.mortbay.http.SocketListener.handleConnection(SocketListener.java:



244)



 at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)



 at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)



Caused by:
org.apache.jasper.JasperException: String index out of range: -1



 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper



.java:372)



 at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2



92)



 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)



 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)



 at

org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427



)



 at

org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati



onHandler.java:473)



 at

org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:262)



 at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:162)



 at

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary



.java:966)



 at

org.apache.jsp.axis2_002dweb.admin_jsp._jspService(admin_jsp.java:71)







 at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)



 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)



 at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper



.java:324)



 at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2



92)



 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)



 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)



 at

org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427



)



 at

org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati



onHandler.java:473)



 at

org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:262)



 at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:162)



 at

org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgen



t.java:116)



 at

org.apache.axis2.transport.http.AdminAgent.processLogin(AdminAgent.ja



va:174)







Thanks,



-Andrew







Andrew J. Cohen

Senior Software Engineer

Semandex Networks, Inc.

201 Washington
  Road

Princeton, NJ 08540-6449

[EMAIL PROTECTED]

phone: 609-720-4929

fax: 609-514-4061



The information contained in this e-mail may be privileged and
confidential, and is intended only for the use of the individual(s) or entity
named above who has specifically been authorized to receive it. I apologize if
you are not the intended recipient-- If you have received this communication in
error, please notify me immediately by telephone or email to avoid any further
misdirected e-mails and please permanently delete the message and all
attachments. Please note that any dissemination, distribution or copying of
this communication is strictly prohibited.












Re: WSDL2Java w/ XMLBeans - not generating some source files

2006-05-16 Thread robert lazarski
There was a similair issue but it is marked as resolved, from around the .95 time frame: 

http://issues.apache.org/jira/browse/AXIS2-527?page=all

There have been some issues resolved with xmlbeans since the 1.0
release, so it may be worth compiling from source. Or perhaps the
nightly binary builds: 

http://cvs.apache.org/dist/axis2/nightly/

If you still have the issue with the latest code base, could you file a jira? 

Robert
http://www.braziloutsource.com/On 5/16/06, Throw Away 
[EMAIL PROTECTED] wrote:
it looks like there is some issue with using an xs:include in the schema's i reference.Are there any known issues with that?If I take the included schema and copy/paste it so i just have one schema w/ no includes, then the code is generated correctly.
On 5/16/06, robert lazarski 

[EMAIL PROTECTED] wrote:
Going to need any schemas you have, such as acme.xsd . 

Robert
http://www.braziloutsource.com/
On 5/16/06, Throw Away 


[EMAIL PROTECTED] wrote:
Due to some sensitivty with the WSDL, I had to change some naming, here it is:?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:wsdl=




http://schemas.xmlsoap.org/wsdl/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema
 xmlns:tns=
http://ws.acme.com/service xmlns:payload=http://ws.acme.com/xsd targetNamespace=

http://ws.acme.com/service name=acmeService wsdl:types schema targetNamespace=



http://ws.acme.com/service
 xmlns=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified
 import namespace=
http://ws.acme.com/xsd
schemaLocation=acme.xsd/ import namespace=
http://ws.acme.com/xsd/acmelite/enterprise
schemaLocation=acme_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite

schemaLocation=acmeLite_TO_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite


schemaLocation=acmeLite_TPO_export.xsd/ /schema /wsdl:types wsdl:message name=searchEventRequest wsdl:part name=request

element=payload:EventSearchCriterion/ /wsdl:message wsdl:message name=searchEventResponse wsdl:part name=response element=payload:EventList/
 /wsdl:message wsdl:message name=getobjectiveByEventRequest wsdl:part name=request
element=payload:objectiveSearchCriterion/
 /wsdl:message wsdl:message name=getobjectiveByEventResponse wsdl:part name=response element=payload:DATA/ /wsdl:message
 wsdl:portType name=port wsdl:operation name=searchEvent wsdl:input name=searchEventRequest
message=tns:searchEventRequest/
 wsdl:output name=searchEventResponse
message=tns:searchEventResponse/ /wsdl:operation wsdl:operation name=getobjectiveByEvent
 wsdl:input name=getobjectiveByEventRequest
message=tns:getobjectiveByEventRequest/ wsdl:output name=getobjectiveByEventResponse

message=tns:getobjectiveByEventResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=acmeServiceBinding type=tns:port
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http
/ wsdl:operation name=searchEvent
 soap:operation soapAction=searchEvent/ wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:input wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:output /wsdl:operation wsdl:operation name=getobjectiveByEvent soap:operation soapAction=getobjectiveByEvent/
 wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:input
 wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:output
 /wsdl:operation /wsdl:binding wsdl:service name=acmeService wsdl:port name=port
binding=tns:acmeServiceBinding
 soap:address location=http://localhost:8080/acme/services/port/
 /wsdl:port /wsdl:service
/wsdl:definitionsOn 5/15/06, robert lazarski 



[EMAIL PROTECTED] wrote:
Post your your entire wsdl and maybe we can help. There's been some
recent fixes for xmlbeans and I can try running your wsdl off of the
latest svn. I can't think off a vaild scenario where you wouldn't get a
document file by the supported styles doc / lit and
rpc / lit , though there might be. There's also the possibilty
that your wsdl explains the problem. 

HTH,
Robert
http://www.braziloutsource.com/
 On 5/15/06, Throw Away [EMAIL PROTECTED]
 wrote:
Hello,I am using the WSDL2Java command to generate some
java files with the XML Beans databinding. For some reason, some
classes that I expect to be generated don't come out. I have been using
Axis2 v 0.93 and am now upgrading to 1.0.Here is a snippet of my WSDL:xs:include schemaLocation=common.xsd/xs:element name=ExportData type=ExportDataType/
xs:complexType name=ExportDataType
 xs:sequence xs:element name=Header type=HeaderType/ xs:sequence xs:element name=Data type=DataType/ /xs:sequence
 /xs:sequence/xs:complexTypeIn the old version, I would get generated types forExportDataTypeExportDataDocumentHeaderType,and so on.But now, I get no class for ExportDataDocument among others.
Some type classes get generated, but not the document.This is the WSDL2Java I am calling from inside of 

axis class path issues

2006-05-16 Thread tom mccarthy
I am having some issues associated with the mysql drivers on my server. 
I am able to compile the webservices I am trying to deploy alright and 
run them as java classes, but when I move them over to axis I get a no 
suitable driver error.


The mysql drivers are currently part of CLASSPATH, which apparently axis 
doesn't like. Does anybody have any idea how to make these drivers 
available to the code within axis? I am right now just copying the java 
class over to a jws in the axis folder.


FactoryConfigurationError on running client from Eclipse

2006-05-16 Thread B R

Hello.

When I try to run PingClient from Eclipse 3.1, I get the
FactoryConfigurationError. My code builds without errors with maven2.
My classpath has almost all the jar files that exist in Aixs2 war's
WEB-INF/lib directory (except wstx-asl-2.9.3, jibx-run1.1-beta-8 and
axis2-soapmonitor, that my pom.xml can not pull from anywhere). Note
however that when I manually add all the jar files from axis2
war/WEB-INF/lib to the classpath, there are no errors, and everything
runs great.

I noticed that there is a similar issue (#AXIS2-668) at
http://issues.apache.org/jira/browse/AXIS2-668.

Can anybody shed some light?

Thanks much :-)

Bhaskar


Detailed error:
-
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
at 
javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
at 
org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:35)
at 
org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:59)
at 
org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:81)
at 
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:63)
at 
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:769)
at 
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:113)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:38)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:90)
at 
org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:185)
at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:83)
at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:197)
at com.copart.ws.client.ping.PingClient.main(PingClient.java:25)
Exception in thread main

--
classpath:
-
classpath
 classpathentry kind=src path=src/main/java/
 classpathentry kind=src path=src/test/java output=target/test-classes/
 classpathentry kind=output path=target/classes/
 classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/
 classpathentry kind=var path=M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar/
 classpathentry kind=var
path=M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar/
 classpathentry kind=var
path=M2_REPO/commons-httpclient/commons-httpclient/3.0/commons-httpclient-3.0.jar/
 classpathentry kind=var
path=M2_REPO/backport-util-concurrent/backport-util-concurrent/2.1/backport-util-concurrent-2.1.jar/
 classpathentry kind=var
path=M2_REPO/annogen/annogen/0.1.0/annogen-0.1.0.jar/
 classpathentry kind=var
path=M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar/
 classpathentry kind=var
path=M2_REPO/axis2/axis2-kernel/1.0/axis2-kernel-1.0.jar/
 classpathentry kind=var
path=M2_REPO/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8.jar/
 classpathentry kind=var path=M2_REPO/xalan/xalan/2.6.0/xalan-2.6.0.jar/
 classpathentry kind=var
path=M2_REPO/xmlbeans/xbean/2.1.0/xbean-2.1.0.jar/
 classpathentry kind=var
path=M2_REPO/ws-commons/neethi/1.0.1/neethi-1.0.1.jar/
 classpathentry kind=var path=M2_REPO/jdom/jdom/1.0/jdom-1.0.jar/
 classpathentry kind=var
path=M2_REPO/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar/
 classpathentry kind=var
path=M2_REPO/commons-fileupload/commons-fileupload/1.0/commons-fileupload-1.0.jar/
 classpathentry kind=var
path=M2_REPO/axis2/axis2-adb/1.0/axis2-adb-1.0.jar/
 classpathentry kind=var
path=M2_REPO/axis2/axis2-codegen/1.0/axis2-codegen-1.0.jar/
 classpathentry kind=var
path=M2_REPO/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar/
 classpathentry kind=var
path=M2_REPO/ws-commons/policy/1.0/policy-1.0.jar/
 classpathentry kind=var
path=M2_REPO/ws-commons/axiom-impl/1.0/axiom-impl-1.0.jar/
 classpathentry kind=var
path=M2_REPO/org/ccil/cowan/tagsoup/tagsoup/0.9.7/tagsoup-0.9.7.jar/
 classpathentry kind=var
path=M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar/
 classpathentry kind=var
path=M2_REPO/wsdl4j/wsdl4j/1.5.2/wsdl4j-1.5.2.jar/
 classpathentry kind=var
path=M2_REPO/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar/
 classpathentry kind=var
path=M2_REPO/axis2/axis2-xmlbeans/1.0/axis2-xmlbeans-1.0.jar/
 classpathentry kind=var path=M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar/
 classpathentry kind=var
path=M2_REPO/ws-commons/axiom-dom/1.0/axiom-dom-1.0.jar/
 classpathentry kind=var
path=M2_REPO/axis2/axis2-java2wsdl/1.0/axis2-java2wsdl-1.0.jar/
 classpathentry kind=var path=M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar/
 classpathentry kind=var

Re: FactoryConfigurationError on running client from Eclipse

2006-05-16 Thread B R

RESOLVED:

I saw a comment by Davanum Srinivas querying somebody if they had
woodstox jar (http://issues.apache.org/jira/browse/AXIS2-668#action_12377946)
in the classpath. So I added this to my maven2 pom.xml after hunting
for it for a while. Then I did a clean install and updated my
.classpath using mvn eclipse:eclipse. Then I ran the PingClient again,
and lo and behold, it worked.

Thanks,
Bhaskar


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

Hello.

When I try to run PingClient from Eclipse 3.1, I get the
FactoryConfigurationError. My code builds without errors with maven2.
My classpath has almost all the jar files that exist in Aixs2 war's
WEB-INF/lib directory (except wstx-asl-2.9.3, jibx-run1.1-beta-8 and
axis2-soapmonitor, that my pom.xml can not pull from anywhere). Note
however that when I manually add all the jar files from axis2
war/WEB-INF/lib to the classpath, there are no errors, and everything
runs great.

I noticed that there is a similar issue (#AXIS2-668) at
http://issues.apache.org/jira/browse/AXIS2-668.

Can anybody shed some light?

Thanks much :-)

Bhaskar


Detailed error:
-
javax.xml.stream.FactoryConfigurationError: Provider
com.bea.xml.stream.MXParserFactory not found
at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
at 
javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
at 
org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:35)
at 
org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:59)
at 
org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:81)
at 
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:63)
at 
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:769)
at 
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:113)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:38)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:90)
at 
org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:185)
at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:83)
at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:197)
at com.copart.ws.client.ping.PingClient.main(PingClient.java:25)
Exception in thread main

--
classpath:
-
classpath
  classpathentry kind=src path=src/main/java/
  classpathentry kind=src path=src/test/java output=target/test-classes/
  classpathentry kind=output path=target/classes/
  classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/
  classpathentry kind=var path=M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar/
  classpathentry kind=var
path=M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar/
  classpathentry kind=var
path=M2_REPO/commons-httpclient/commons-httpclient/3.0/commons-httpclient-3.0.jar/
  classpathentry kind=var
path=M2_REPO/backport-util-concurrent/backport-util-concurrent/2.1/backport-util-concurrent-2.1.jar/
  classpathentry kind=var
path=M2_REPO/annogen/annogen/0.1.0/annogen-0.1.0.jar/
  classpathentry kind=var
path=M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar/
  classpathentry kind=var
path=M2_REPO/axis2/axis2-kernel/1.0/axis2-kernel-1.0.jar/
  classpathentry kind=var
path=M2_REPO/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8.jar/
  classpathentry kind=var path=M2_REPO/xalan/xalan/2.6.0/xalan-2.6.0.jar/
  classpathentry kind=var
path=M2_REPO/xmlbeans/xbean/2.1.0/xbean-2.1.0.jar/
  classpathentry kind=var
path=M2_REPO/ws-commons/neethi/1.0.1/neethi-1.0.1.jar/
  classpathentry kind=var path=M2_REPO/jdom/jdom/1.0/jdom-1.0.jar/
  classpathentry kind=var
path=M2_REPO/com/ibm/icu/icu4j/2.6.1/icu4j-2.6.1.jar/
  classpathentry kind=var
path=M2_REPO/commons-fileupload/commons-fileupload/1.0/commons-fileupload-1.0.jar/
  classpathentry kind=var
path=M2_REPO/axis2/axis2-adb/1.0/axis2-adb-1.0.jar/
  classpathentry kind=var
path=M2_REPO/axis2/axis2-codegen/1.0/axis2-codegen-1.0.jar/
  classpathentry kind=var
path=M2_REPO/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar/
  classpathentry kind=var
path=M2_REPO/ws-commons/policy/1.0/policy-1.0.jar/
  classpathentry kind=var
path=M2_REPO/ws-commons/axiom-impl/1.0/axiom-impl-1.0.jar/
  classpathentry kind=var
path=M2_REPO/org/ccil/cowan/tagsoup/tagsoup/0.9.7/tagsoup-0.9.7.jar/
  classpathentry kind=var
path=M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar/
  classpathentry kind=var
path=M2_REPO/wsdl4j/wsdl4j/1.5.2/wsdl4j-1.5.2.jar/
  classpathentry kind=var

Re: WSDL2Java w/ XMLBeans - not generating some source files

2006-05-16 Thread Throw Away
I will attempt to recompile the nightly build and try my WSDL. For now I can work around some of the issues by placing my common schema in a different namespace.On 5/16/06, 
robert lazarski [EMAIL PROTECTED] wrote:
There was a similair issue but it is marked as resolved, from around the .95 time frame: 

http://issues.apache.org/jira/browse/AXIS2-527?page=all

There have been some issues resolved with xmlbeans since the 1.0
release, so it may be worth compiling from source. Or perhaps the
nightly binary builds: 

http://cvs.apache.org/dist/axis2/nightly/

If you still have the issue with the latest code base, could you file a jira? 

Robert
http://www.braziloutsource.com/On 5/16/06, 
Throw Away 
[EMAIL PROTECTED] wrote:
it looks like there is some issue with using an xs:include in the schema's i reference.Are there any known issues with that?If I take the included schema and copy/paste it so i just have one schema w/ no includes, then the code is generated correctly.
On 5/16/06, robert lazarski 


[EMAIL PROTECTED] wrote:
Going to need any schemas you have, such as acme.xsd . 

Robert
http://www.braziloutsource.com/
On 5/16/06, Throw Away 



[EMAIL PROTECTED] wrote:
Due to some sensitivty with the WSDL, I had to change some naming, here it is:?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:wsdl=





http://schemas.xmlsoap.org/wsdl/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema
 xmlns:tns=
http://ws.acme.com/service xmlns:payload=http://ws.acme.com/xsd targetNamespace=

http://ws.acme.com/service name=acmeService wsdl:types schema targetNamespace=




http://ws.acme.com/service
 xmlns=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified
 import namespace=
http://ws.acme.com/xsd
schemaLocation=acme.xsd/ import namespace=
http://ws.acme.com/xsd/acmelite/enterprise
schemaLocation=acme_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite

schemaLocation=acmeLite_TO_export.xsd/ import namespace=http://ws.acme.com/xsd/acmelite


schemaLocation=acmeLite_TPO_export.xsd/ /schema /wsdl:types wsdl:message name=searchEventRequest wsdl:part name=request

element=payload:EventSearchCriterion/ /wsdl:message wsdl:message name=searchEventResponse wsdl:part name=response element=payload:EventList/
 /wsdl:message wsdl:message name=getobjectiveByEventRequest wsdl:part name=request
element=payload:objectiveSearchCriterion/
 /wsdl:message wsdl:message name=getobjectiveByEventResponse wsdl:part name=response element=payload:DATA/ /wsdl:message
 wsdl:portType name=port wsdl:operation name=searchEvent wsdl:input name=searchEventRequest
message=tns:searchEventRequest/
 wsdl:output name=searchEventResponse
message=tns:searchEventResponse/ /wsdl:operation wsdl:operation name=getobjectiveByEvent
 wsdl:input name=getobjectiveByEventRequest
message=tns:getobjectiveByEventRequest/ wsdl:output name=getobjectiveByEventResponse

message=tns:getobjectiveByEventResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=acmeServiceBinding type=tns:port
 soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http
/ wsdl:operation name=searchEvent
 soap:operation soapAction=searchEvent/ wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:input wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service
/ /wsdl:output /wsdl:operation wsdl:operation name=getobjectiveByEvent soap:operation soapAction=getobjectiveByEvent/
 wsdl:input
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:input
 wsdl:output
soap:body use=literal namespace=http://ws.acme.com/service/ /wsdl:output
 /wsdl:operation /wsdl:binding wsdl:service name=acmeService wsdl:port name=port
binding=tns:acmeServiceBinding
 soap:address location=http://localhost:8080/acme/services/port/
 /wsdl:port /wsdl:service
/wsdl:definitionsOn 5/15/06, robert lazarski 




[EMAIL PROTECTED] wrote:
Post your your entire wsdl and maybe we can help. There's been some
recent fixes for xmlbeans and I can try running your wsdl off of the
latest svn. I can't think off a vaild scenario where you wouldn't get a
document file by the supported styles doc / lit and
rpc / lit , though there might be. There's also the possibilty
that your wsdl explains the problem. 

HTH,
Robert
http://www.braziloutsource.com/
 On 5/15/06, Throw Away [EMAIL PROTECTED]
 wrote:
Hello,I am using the WSDL2Java command to generate some
java files with the XML Beans databinding. For some reason, some
classes that I expect to be generated don't come out. I have been using
Axis2 v 0.93 and am now upgrading to 1.0.Here is a snippet of my WSDL:xs:include schemaLocation=common.xsd/xs:element name=ExportData type=ExportDataType/
xs:complexType name=ExportDataType
 xs:sequence xs:element name=Header type=HeaderType/ xs:sequence xs:element name=Data type=DataType/ /xs:sequence
 /xs:sequence/xs:complexTypeIn the old version, I would get generated types 

RE: Jibx, Axis2 and multiple binding files

2006-05-16 Thread Matt Hoffman

I thought I had a valid use case for this same feature, but perhaps
I'm just missing something in JiBX.  I have one service with two
methods:  postObject1 and postObject2, where Object1 and Object2
are the different versions of the same object, versioned by namespace.
So postObject1  takes an argument called Object with namespace
urn:blah:1.0, and postObject2 takes an argument called Object with
namespace urn:blah:1.1.
On the code side, Object1 and Object2 are getting mapped to the same
Java object -- they're very similar, and JiBX gives me the flexibility
to reconcile their differences during deserialization.  However, since
Object1 and Object2 are getting mapped to the same java type, they
have to (as far as I'm aware) live in two different binding files.
So, is there another way I should be going about it, that doesn't
involve multiple binding files?


Thanks,

Matt

-Original Message-
List:   axis-user
Subject:RE: Jibx, Axis2 and multiple binding files
From:   Andres Olave Andres.Olave () Virginmobile ! com
Date:   2006-05-10 17:04:43
Message-ID: DF7A2D28EF683D4F9480C841710C4339E8C679 () MAIL ! virginmobile ! com

Thanks Dennis,

Yeah, basically because i was just implementing a proof of concept and
hadn't got \
around to having a single file which included all 4 files. Fixed that
up and came \
across another interesting thing, which is that the wsdl message
components have to \
be specified in the top level binding file.

We will probably share some of those message components in different
services, so (if \
i could sneakily suggest) that it'd be great if the code generator
would be able to \
look at the mappings that are being included as well.

Anyway it all looks brilliant now as the interface the generator
popped out with is \
exactly as expected - matching our thoroughly unit tested
implementation. Now on to \
the axis2 testing :)

Cheers,
Andres

-Original Message-
From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]
Sent: 09 May 2006 22:06
To: axis-user@ws.apache.org
Subject: Re: Jibx, Axis2 and multiple binding files


Hi Andres,

I didn't realize there'd be a need for handling multiple binding
definitions as part of a single service, since generally a service is
working with related data. Is there a reason you have your binding
structured this way?

Right now the code makes the assumption (in both WSDL2Java and runtime)
that there'll only be a single binding per service. I'm generalizing the
code to handle unwrapped operations now so that you don't need to create
or bind those wrapper classes for method parameters. Hopefully I can fix
things for your case as well.

 - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Andres Olave wrote:


Hi there,

I have been playing around with the Jibx support, but the current
project i am trying to migrate across to Axis 2 has 4 jibx mapping
files. How should I go about running the code generator to take in all
of the binding?files?

Thanks,
Andres


IMPORTANT
The contents of this email (and any attachment):
(1) are confidential and may be legally privileged - if it is not
meant for
you, please tell the sender, do not forward or copy the contents
and delete it from your system immediately;
(2) come from its author and may not necessarily reflect the opinions
of Virgin Mobile.
While emails and attachments are virus checked,
we cannot accept any liability in respect of any viruses.
We may monitor emails sent to Virgin Mobile.

Want to know more about Virgin Mobile?
Visit our website for the latest info, phones and special offers
http://www.virgin.com/mobile

Virgin Mobile Telecoms Ltd



IMPORTANT
The contents of this email (and any attachment):
(1) are confidential and may be legally privileged - if it is not meant for
you, please tell the sender, do not forward or copy the contents
and delete it from your system immediately;
(2) come from its author and may not necessarily reflect the opinions
of Virgin Mobile.
While emails and attachments are virus checked,
we cannot accept any liability in respect of any viruses.
We may monitor emails sent to Virgin Mobile.

Want to know more about Virgin Mobile?
Visit our website for the latest info, phones and special offers
http://www.virgin.com/mobile

Virgin Mobile Telecoms Ltd


java.lang.NoSuchMethodError

2006-05-16 Thread Krishnan T
Hi

I am getting the following error during the webservice
call.
In Windows environment i am not getting this error and
my webservice call is working fine, I am getting this
error only in Linux environment.

java.lang.NoSuchMethodError:
javax.xml.namespace.QName.getPrefix()Ljava/lang/String;
at
org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithDifferentLocal(BackslashUtil.java:62)
at
org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithBackslashlessLocal(BackslashUtil.java:39)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populateServices(SymbolTable.java:3078)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:745)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:534)
05/17/06 10:27:37.499 IST Error Service Exception
in Tomcat server t1, method  createCall(): Error
processing WSDL document:
javax.xml.rpc.ServiceException: Error processing WSDL
document:
05/17/06 10:27:40.143 IST Error Service Exception
in Tomcat server t2, method  createCall(): Error
processing WSDL document:

I am using axis-1.3, SAAJ 1.2
Windows : Windows 2000
Java : 1.4.2_10
JBoss : 3.2.3
Linux : Red Hat

Please send me your suggestions to resolve this issue

Regards
Gopalakrishnan T

Send instant messages to your online friends http://in.messenger.yahoo.com