Re: server fault is not returned to the client when the client-side repository is used with addressing module

2009-07-16 Thread Huitang Li
It turns out that there is a simple solution there. Just replace apache axiom 
jars with the latest axiom jars, and it will solve the issue. It is caused by 
an apache axiom bug which affects rampart.



NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.

- Original Message -
From: "Huitang Li" 
To: axis-user@ws.apache.org
Sent: Thursday, July 16, 2009 6:55:03 PM GMT -06:00 US/Canada Central
Subject: Re: server fault is not returned to the client when the client-side 
repository is used with addressing module

In addition, I am using addressing module and rampart module for security on 
both client and server.

>From some web postings, it seems that the "The input stream for an incoming 
>message is null" is caused by rampart. However, I cannot find a solution. I am 
>using rampart-1.4.mar

Any help? 

Thanks.


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.

- Original Message -
From: "Huitang Li" 
To: axis-user@ws.apache.org
Sent: Thursday, July 16, 2009 6:05:55 PM GMT -06:00 US/Canada Central
Subject: server fault is not returned to the client when the client-side 
repository is used with addressing module

Hi,

I am using client-side repository with addressing module to connect to an Axis 
2.1.4.1 web service(In-out pattern). The client and the web service are both 
running on my local machine. One thing I notice is that when a fault is thrown 
in the server, the client side got "500 Internal Server Error" in the response, 
and no fault message is received, and then client side throws an axis exception:

org.apache.axis2.AxisFault: The input stream for an incoming message is null.
at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72).


Two things are noticed:

1) If there is no fault generated in the server, the client receives the 
expected soap response.
2) If the client side does not use addressing module in the client-side 
repository, the client will receive the server fault.

The problem is: the client needs to use addressing module and needs to receive 
the fault when the fault is generated in the server. Does anyone know how to 
handle it?

I tried to disable "chunk" as suggested by at least one posting for the "The 
input stream for an incoming message is null" issue, and it does not help solve 
my problem.

Thanks very much.

Thanks.



NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.


Re: Axis WS on mobile devices

2009-07-16 Thread Demetris G


I was expecting so - thanks Dennis - so my best bet to "emulate" Axis 
engines (server/client

behavior) on mobile devices is not kSOAPx ;)

Dennis Sosnoski wrote:

Hi Demetris,

I haven't worked with kSOAP/kSOAP2 myself, but from what I remember it 
provides very basic support for SOAP messaging. So no, I don't think 
it handles code generation. :-(


 - Dennis


Demetris G wrote:


Hi Dennis,

   in case you know while I am still looking for good tutorials on 
this - is the kSOAP/kSOAP2 engine
along the lines of Axis? I mean, beyond the general implementation of 
the specification, does it offer
tools to generate stubs from WSDL files etc? I don't seem to be able 
to find even these basic

documentations on their web site.

Thanks very much

Dennis Sosnoski wrote:

Hi Demetris,

kXML is the parser you'd use with JiBX for J2ME support. From what I 
know of kSOAP/kSOAP2 I suspect they'd be considerably lower 
performance than JiBX/WS, but if you're not anticipating a high 
message volume that shouldn't really matter. They'd probably also be 
more memory-intensive, though, and that might be more of an issue. 
Bottom line is probably that you should give them a try and see if 
they meet your needs.


And yes, JiBX is open source with a BSD-style license.

 - Dennis







Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

2009-07-16 Thread cbr600

Hi Nan,

Sample 06 is working :-), thank you very much.

I have a question about the mex web service. According to
WS-MetadataExchange specification
http://specs.xmlsoap.org/ws/2004/09/mex/WS-MetadataExchange.pdf , there are
two ways to get the metadata:

Option 1) A simple way using POST as described in Section 1 of the spec.
Option 2) Retrieving metadata via a web service as described in Section 4 of
the spec. Sample 06 implements this solution.

The STS which I am consuming, only supports 'option 1' at the moment. I am
just wondering if Rampart can support WS-MetadataExchange with 'option 1'?
If Rampart can support 'option 1', would it be possible to provide us an
example please?

Any help or suggestion would be greatly appreciated.

Regards,
Phillip

cbr600 wrote:
> 
> Hi,
> 
> I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> downloaded from this link:
> Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
> 
> The service and the STS works fine after fixing few things in the
> build.xml (please see below):
> 
> -
> property name="addressing.mar" value="addressing-1.5.mar"
> property name="rampart.mar" value="rampart-1.4.mar"
> property name="rahas.mar" value="rahas-1.4.mar"
> -
> 
> But when I run the client, the program threw exception as following:
> 
> -
> C:\Documents and
> Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> samples\policy>"C:\Documents and
> Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> bin\apache-ant-1.7.1\bin\ant" client.06
> Buildfile: build.xml
> 
> check.dependency:
> 
> client.06:
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> [java] log4j:WARN No appenders could be found for logger
> (org.apache.axis2.
> deployment.FileSystemConfigurator).
> [java] log4j:WARN Please initialize the log4j system properly.
> [java] Exception in thread "main" org.apache.axis2.AxisFault: Error in
> crea
> ting an encrypted key
> [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> .java:70)
> [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
> [java] at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251
> )
> [java] at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:416)
> [java] at org.apache.axis2.description.OutInAxisOperationClient.send(Ou
> tInAxisOperation.java:402)
> [java] at org.apache.axis2.description.OutInAxisOperationClient.execute
> Impl(OutInAxisOperation.java:229)
> [java] at org.apache.axis2.client.OperationClient.execute(OperationClie
> nt.java:165)
> [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> nt.java:539)
> [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> nt.java:520)
> [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> n Source)
> [java] Caused by: org.apache.rampart.RampartException: Error in creating
> an
> encrypted key
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:228)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> ptedKey(SymmetricBindingBuilder.java:697)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> reEncrypt(SymmetricBindingBuilder.java:422)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> etricBindingBuilder.java:90)
> [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> 44)
> [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> .java:64)
> [java] ... 9 more
> [java] Caused by: org.apache.ws.security.WSSecurityException: An
> unsupporte
> d signature or encryption algorithm was used (unsupported key transport
> encrypti
> on algorithm: No such algorithm:
> http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> )
> [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> WSSecurityUtil.java:689)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
> nal(WSSecEncryptedKey.java:195)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
> cEncryptedKey.java:173)
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(Bind

Re: server fault is not returned to the client when the client-side repository is used with addressing module

2009-07-16 Thread Huitang Li
In addition, I am using addressing module and rampart module for security on 
both client and server.

>From some web postings, it seems that the "The input stream for an incoming 
>message is null" is caused by rampart. However, I cannot find a solution. I am 
>using rampart-1.4.mar

Any help? 

Thanks.


NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.

- Original Message -
From: "Huitang Li" 
To: axis-user@ws.apache.org
Sent: Thursday, July 16, 2009 6:05:55 PM GMT -06:00 US/Canada Central
Subject: server fault is not returned to the client when the client-side 
repository is used with addressing module

Hi,

I am using client-side repository with addressing module to connect to an Axis 
2.1.4.1 web service(In-out pattern). The client and the web service are both 
running on my local machine. One thing I notice is that when a fault is thrown 
in the server, the client side got "500 Internal Server Error" in the response, 
and no fault message is received, and then client side throws an axis exception:

org.apache.axis2.AxisFault: The input stream for an incoming message is null.
at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72).


Two things are noticed:

1) If there is no fault generated in the server, the client receives the 
expected soap response.
2) If the client side does not use addressing module in the client-side 
repository, the client will receive the server fault.

The problem is: the client needs to use addressing module and needs to receive 
the fault when the fault is generated in the server. Does anyone know how to 
handle it?

I tried to disable "chunk" as suggested by at least one posting for the "The 
input stream for an incoming message is null" issue, and it does not help solve 
my problem.

Thanks very much.

Thanks.



NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.


server fault is not returned to the client when the client-side repository is used with addressing module

2009-07-16 Thread Huitang Li
Hi,

I am using client-side repository with addressing module to connect to an Axis 
2.1.4.1 web service(In-out pattern). The client and the web service are both 
running on my local machine. One thing I notice is that when a fault is thrown 
in the server, the client side got "500 Internal Server Error" in the response, 
and no fault message is received, and then client side throws an axis exception:

org.apache.axis2.AxisFault: The input stream for an incoming message is null.
at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72).


Two things are noticed:

1) If there is no fault generated in the server, the client receives the 
expected soap response.
2) If the client side does not use addressing module in the client-side 
repository, the client will receive the server fault.

The problem is: the client needs to use addressing module and needs to receive 
the fault when the fault is generated in the server. Does anyone know how to 
handle it?

I tried to disable "chunk" as suggested by at least one posting for the "The 
input stream for an incoming message is null" issue, and it does not help solve 
my problem.

Thanks very much.

Thanks.



NOTICE: This e-mail message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information.  Any unauthorized 
review, use, disclosure or distribution is prohibited. Nothing contained in 
this message or in any attachment shall constitute a contract or electronic 
signature under the Electronic Signatures in Global and National Commerce Act, 
any version of the Uniform Electronic Transactions Act or any other statute 
governing electronic transactions.


Re: Axis WS on mobile devices

2009-07-16 Thread Dennis Sosnoski

Hi Demetris,

I haven't worked with kSOAP/kSOAP2 myself, but from what I remember it 
provides very basic support for SOAP messaging. So no, I don't think it 
handles code generation. :-(


 - Dennis


Demetris G wrote:


Hi Dennis,

   in case you know while I am still looking for good tutorials on 
this - is the kSOAP/kSOAP2 engine
along the lines of Axis? I mean, beyond the general implementation of 
the specification, does it offer
tools to generate stubs from WSDL files etc? I don't seem to be able 
to find even these basic

documentations on their web site.

Thanks very much

Dennis Sosnoski wrote:

Hi Demetris,

kXML is the parser you'd use with JiBX for J2ME support. From what I 
know of kSOAP/kSOAP2 I suspect they'd be considerably lower 
performance than JiBX/WS, but if you're not anticipating a high 
message volume that shouldn't really matter. They'd probably also be 
more memory-intensive, though, and that might be more of an issue. 
Bottom line is probably that you should give them a try and see if 
they meet your needs.


And yes, JiBX is open source with a BSD-style license.

 - Dennis





Re: Axis WS on mobile devices

2009-07-16 Thread Demetris G


Hi Dennis,

   in case you know while I am still looking for good tutorials on this 
- is the kSOAP/kSOAP2 engine
along the lines of Axis? I mean, beyond the general implementation of 
the specification, does it offer
tools to generate stubs from WSDL files etc? I don't seem to be able to 
find even these basic

documentations on their web site.

Thanks very much

Dennis Sosnoski wrote:

Hi Demetris,

kXML is the parser you'd use with JiBX for J2ME support. From what I 
know of kSOAP/kSOAP2 I suspect they'd be considerably lower 
performance than JiBX/WS, but if you're not anticipating a high 
message volume that shouldn't really matter. They'd probably also be 
more memory-intensive, though, and that might be more of an issue. 
Bottom line is probably that you should give them a try and see if 
they meet your needs.


And yes, JiBX is open source with a BSD-style license.

 - Dennis



Re: New Line character is escaped in the created SOAP message in Axis2 1.4 web service.

2009-07-16 Thread Andreas Veithen
Dennis,

Probably one could discuss for hours what should be considered as the
correct behavior, and there are good arguments for both points of
view. I guess that for Woodstox, the justification is that their
approach guarantees that when serializing and deserializing a
document, CHARACTERS events are reconstructed exactly, i.e. without
loosing CR characters.

As suggested in my initial reply, I think that Axiom has everything
that is needed to make this easily configurable. I was planning to add
a FAQ entry to explain how to achieve this.

Andreas

On Thu, Jul 16, 2009 at 18:39, Dennis Sosnoski wrote:
> Hi Andreas,
>
> Calling this "the correct behavior" seems a stretch to me. It's the expected
> behavior using the Woodstox output handling, but it leads to strange results
> in practice. There's no justification in terms of the XML specification for
> escaping the LF character, since the specification explicitly allows for the
> various CR/LF combinations (and normalizes them all on input).
>
> It'd be better if Axis2 disabled this Woodstox peculiarity by default.
>
>  - Dennis
>
>
> Andreas Veithen wrote:
>>
>> Yuri,
>>
>> This is actually the correct behavior. There is a discussion in
>> WSCOMMONS-243 [1] and WSTX-94 [2] about why this is so. If you need to
>> override this behavior, you may use the feature introduced by
>> WSCOMMONS-461.
>>
>> Andreas
>>
>> [1] https://issues.apache.org/jira/browse/WSCOMMONS-243
>> [2] http://jira.codehaus.org/browse/WSTX-94
>>
>> On Wed, Jul 15, 2009 at 04:11, iuriep wrote:
>>
>>>
>>> Hello,
>>>
>>> I have implemented a web service and deployed it on Apache Axis2 1.4
>>>
>>> One of the XML elements (Payload element) declared as XML type 'String'
>>> may
>>> include text containing CRLF (carriage-return, linefeed) character
>>> sequence.
>>>
>>> The problem is that CRLF character sequence is normalized by Axis into
>>> #xD.
>>> The LF character is escaped in the output.
>>>
>>> The Java code used to serialize the content of Payload element was
>>> generated
>>> by WSDL2Java tool and looks like this:
>>>
>>> public void serialize(final QName parentQName,
>>>                         final OMFactory factory,
>>>                         MTOMAwareXMLStreamWriter xmlWriter,
>>>                         boolean serializeType)
>>>           throws XMLStreamException, ADBException {
>>>
>>>       protected String localPayload;
>>>       ...
>>>       if (localPayload == null) {
>>>           // write the nil attribute
>>>           throw new ADBException(PAYLOAD_CANNOT_BE_NULL);
>>>       } else {
>>>           xmlWriter.writeCharacters(localPayload);
>>>       }
>>>       ...
>>> }
>>>
>>> In the tcpmonitor the SOAP message that is being sent looks like:
>>>
>>> POST /axis2/services/Core/realtime/?OrgTaskID=100303 HTTP/1.1
>>> Content-Type: application/soap+xml; charset=UTF-8;
>>> action="RealTimeTransaction"
>>> User-Agent: Axis2
>>> Host: iuriep-ws:8079
>>> Transfer-Encoding: chunked
>>>
>>> 
>>>  >> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>>>     
>>>        >>
>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
>>> soapenv:mustUnderstand="true">
>>>           >>
>>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
>>> wsu:Id="UsernameToken-29624571">
>>>              user100303
>>>              >>
>>> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>kL1dVUPf5U
>>>           
>>>        
>>>     
>>>     
>>>        >> xmlns:ns1="http://www.caqh.org/SOAP/WSDL/CORERule2.0.1.xsd";>
>>>           X12_276_004010X093A1
>>>           RealTime
>>>           a7cea1a0-6cb9-11de-8782-000c2987b7be
>>>           2009-07-09T06:52:30Z
>>>           EDIFECS TSK0021
>>>           987654321
>>>           2.0.1
>>>
>>> ISA*00*00*987654321*0652*0*P*:#xD;GS*HR*TSK0021*004010X093A1#xD;ST*276*0001#xD;BHT*0010*13**4*3*22*0#xD;DMG*D8*19821103*M#xD;NM1*IL*1*PULSIPHER*BILL*K***MI*5643796#xD;TRN*1*ICN98765432#xD;REF*1K*DCN123467#xD;AMT*T3*2312#xD;DTP*232*RD8*20080401-20080430#xD;SE*16*0001#xD;GE*1*11112#xD;IEA*1*11112#xD;
>>>        
>>>     
>>>  
>>>
>>>
>>> I have used WSDL2java tool to generate the stubs, skeletons, and data
>>> types
>>> from WSDL
>>> I am also using the Pampart 1.4 module to include security headers into
>>> the
>>> SOAP message.
>>>
>>> Thanks in advance for any suggestion,
>>> Yuri
>>> --
>>> View this message in context:
>>> http://www.nabble.com/New-Line-character-is-escaped-in-the-created-SOAP-message-in-Axis2-1.4-web-service.-tp24490808p24490808.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>>
>>
>>
>


[Axis2]C++ Version

2009-07-16 Thread Owais Khan
Hello All,
Can anyone guide me where I can find information about AXIS2 release for C++
on Linux.Thanks.
Regards,
M Owais Khan.


Re: [Axis2] Null array

2009-07-16 Thread Dennis Sosnoski
I'm not sure what Martin meant in his reply. This sounds like it's an 
ADB-specific problem. Assuming the schema is along these lines:


 
   
 
   
 
   
 

the expected handling would be to generate  
when the array is null. If ADB is not doing this it should be considered 
a bug. Likewise on input, if the XML contains  
the unmarshalled array should be set to null. I believe JiBX handles 
this case as expected.


 - Dennis

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



Nora Serinek wrote:

And for ADB binding? (Where the same problem occurs)


Am Donnerstag, den 07.05.2009, 15:28 -0400 schrieb Martin Gainty:

for non-ADB databinding use minOccurs="0" e.g.


Martin
__
Disclaimer and Confidentiality/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité

This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.









Subject: [Axis2] Null array
Date: Thu, 7 May 2009 11:34:58 -0700
From: sow...@telenav.com
To: axis-user@ws.apache.org

I have a nillable object array in my schema. If I set this to NULL in 
my service code, the client is getting an array with size 1, and the 
element at index 0 is NULL. Is this the expected behavior? Shouldn’t 
the array itself be set to NULL?


 


- Sowmi

 

*Sowmitra Thallapragada | TeleNav Inc. | +1 408 207 4116 | 
sow...@telenav.com | www.telenav.com*


 






Windows Live™: Keep your life in sync. Check it out. 
 

###
This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this e-mail in error please notify
the system manager.


Re: New Line character is escaped in the created SOAP message in Axis2 1.4 web service.

2009-07-16 Thread Dennis Sosnoski

Hi Andreas,

Calling this "the correct behavior" seems a stretch to me. It's the 
expected behavior using the Woodstox output handling, but it leads to 
strange results in practice. There's no justification in terms of the 
XML specification for escaping the LF character, since the specification 
explicitly allows for the various CR/LF combinations (and normalizes 
them all on input).


It'd be better if Axis2 disabled this Woodstox peculiarity by default.

 - Dennis


Andreas Veithen wrote:

Yuri,

This is actually the correct behavior. There is a discussion in
WSCOMMONS-243 [1] and WSTX-94 [2] about why this is so. If you need to
override this behavior, you may use the feature introduced by
WSCOMMONS-461.

Andreas

[1] https://issues.apache.org/jira/browse/WSCOMMONS-243
[2] http://jira.codehaus.org/browse/WSTX-94

On Wed, Jul 15, 2009 at 04:11, iuriep wrote:
  

Hello,

I have implemented a web service and deployed it on Apache Axis2 1.4

One of the XML elements (Payload element) declared as XML type 'String' may
include text containing CRLF (carriage-return, linefeed) character sequence.

The problem is that CRLF character sequence is normalized by Axis into #xD.
The LF character is escaped in the output.

The Java code used to serialize the content of Payload element was generated
by WSDL2Java tool and looks like this:

public void serialize(final QName parentQName,
 final OMFactory factory,
 MTOMAwareXMLStreamWriter xmlWriter,
 boolean serializeType)
   throws XMLStreamException, ADBException {

   protected String localPayload;
   ...
   if (localPayload == null) {
   // write the nil attribute
   throw new ADBException(PAYLOAD_CANNOT_BE_NULL);
   } else {
   xmlWriter.writeCharacters(localPayload);
   }
   ...
}

In the tcpmonitor the SOAP message that is being sent looks like:

POST /axis2/services/Core/realtime/?OrgTaskID=100303 HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8;
action="RealTimeTransaction"
User-Agent: Axis2
Host: iuriep-ws:8079
Transfer-Encoding: chunked


  http://www.w3.org/2003/05/soap-envelope";>
 
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
soapenv:mustUnderstand="true">
   http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
wsu:Id="UsernameToken-29624571">
  user100303
  http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>kL1dVUPf5U
   

 
 
http://www.caqh.org/SOAP/WSDL/CORERule2.0.1.xsd";>
   X12_276_004010X093A1
   RealTime
   a7cea1a0-6cb9-11de-8782-000c2987b7be
   2009-07-09T06:52:30Z
   EDIFECS TSK0021
   987654321
   2.0.1
ISA*00*00*987654321*0652*0*P*:#xD;GS*HR*TSK0021*004010X093A1#xD;ST*276*0001#xD;BHT*0010*13**4*3*22*0#xD;DMG*D8*19821103*M#xD;NM1*IL*1*PULSIPHER*BILL*K***MI*5643796#xD;TRN*1*ICN98765432#xD;REF*1K*DCN123467#xD;AMT*T3*2312#xD;DTP*232*RD8*20080401-20080430#xD;SE*16*0001#xD;GE*1*11112#xD;IEA*1*11112#xD;

 
  


I have used WSDL2java tool to generate the stubs, skeletons, and data types
from WSDL
I am also using the Pampart 1.4 module to include security headers into the
SOAP message.

Thanks in advance for any suggestion,
Yuri
--
View this message in context: 
http://www.nabble.com/New-Line-character-is-escaped-in-the-created-SOAP-message-in-Axis2-1.4-web-service.-tp24490808p24490808.html
Sent from the Axis - User mailing list archive at Nabble.com.





  


RE: [Axis2] Null array

2009-07-16 Thread Nora Serinek
And for ADB binding? (Where the same problem occurs)


Am Donnerstag, den 07.05.2009, 15:28 -0400 schrieb Martin Gainty:

> for non-ADB databinding use minOccurs="0" e.g.
> 
> 
> Martin 
> __ 
> Disclaimer and Confidentiality/Verzicht und
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
> 
> This message is confidential. If you should not be the intended receiver, 
> then we ask politely to report. Each unauthorized forwarding or manufacturing 
> of a copy is inadmissible. This message serves only for the exchange of 
> information and has no legal binding effect. Due to the easy manipulation of 
> emails we cannot take responsibility over the the contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> 
> 
> 
> __
> Subject: [Axis2] Null array
> Date: Thu, 7 May 2009 11:34:58 -0700
> From: sow...@telenav.com
> To: axis-user@ws.apache.org
> 
> 
> I have a nillable object array in my schema. If I set this to NULL in
> my service code, the client is getting an array with size 1, and the
> element at index 0 is NULL. Is this the expected behavior? Shouldn’t
> the array itself be set to NULL?
> 
>  
> 
> - Sowmi
> 
>  
> 
> Sowmitra Thallapragada | TeleNav Inc. | +1 408 207 4116 |
> sow...@telenav.com | www.telenav.com
> 
>  
> 
> 
> 
> 
> 
> __
> Windows Live™: Keep your life in sync. Check it out.
###
This e-mail and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this e-mail in error please notify 
the system manager.


https transport

2009-07-16 Thread axis
Hi,

I'm not sure offhand how to make the server certificate authentication work
in that situation, but I believe Axis2 is using the Commons HttpClient by
default, and that appears to offer a way of using your own socket factory

Below is the exception :

SSL HANDSHAKE FAILURE:  A signer with SubjectDN "CN=ecs.amazonaws.com,
O=Amazon.com Inc., L=Seattle, ST=Washington, C=US" was sent from target
host:port "null:null".  The signer may need to be added to local trust
store "C:/Program
Files/IBM/SDP/runtimes/base_v7/profiles/hub20/config/cells/localhostNode01Cell/nodes/localhostNode01/trust.p12"
located in SSL configuration alias "NodeDefaultSSLSettings" loaded from
SSL configuration file "security.xml".  The extended error message from
the SSL handshake exception is: "PKIX path building failed:
java.security.cert.CertPathBuilderException: invalid certificate, key
identifier is missing from authority key identifier extension".

Thanks
Senthil



Re: Rampart error (Incoming message does not contain required Security header)

2009-07-16 Thread Chinmoy Chakraborty
Hi Nandana,

Now it works. The problem was the param 'InFlow' and some others are case
sensitive. I edited them and it worked.

Thanks.

Chinmoy

On Thu, Jul 16, 2009 at 5:19 PM, Chinmoy Chakraborty wrote:

> Hi Nandana,
>
> Thanks a lot for the reply. Now I am getting following error:
>
> org.apache.axis2.deployment.DeploymentException: The "Dispatch" phase is
> not found on the global "InFlow" phase of the axis2.xml file. Make sure the
> phase is within the axis2.xml file.
>  at
> org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)
>  at
> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:133)
>  at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
>  at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)
>
> My client code is:
>
> try {
>   ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:/Codes/weblims3/exploded/WEB-INF",
> "D:/Codes/weblims3/axis2.xml");
>   } catch (AxisFault axisFault) {
>   axisFault.printStackTrace();
>   }
>  The error is happening in the previous line. What does it meant by
> "Repository Path"? Please find attached axis2.xml.
>
> Chinmoy
>
>
>
>
>
>
>
> On Thu, Jul 16, 2009 at 9:27 AM, Nandana Mihindukulasooriya <
> nandana@gmail.com> wrote:
>
>> Hi Chinmoy,
>> As it seems, you don't have the "OutflowSecurity" parameter
>> defined in the client side. So basically you need to have a client side
>> axis2 with that parameter and then create a ConfigurationContext out of it.
>> Rampart basic sample 01 shows how to do this [1],[2]. But you won't be able
>> to pass username/password through options when you use parameter based
>> configuration. Is there a possibility for you to use policy based
>> configuration. If so, please look at following tutorial [2].
>>
>> regards,
>> Nandana
>>
>> [1] -
>> https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml
>> [2] -
>> https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java
>> [3] - https://www.wso2.org/library/3190
>>
>>
>> On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty wrote:
>>
>>> Hi,
>>>
>>> I am getting following error while trying to invoke a WS-Security enabled
>>> client request:
>>>
>>> org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not
>>> contain required Security header
>>>  at
>>> org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221)
>>>  at
>>> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86)
>>>  at
>>> org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
>>>  at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>>>  at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>>>  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>>>
>>> I am missing something I know but not sure what. Following is my client
>>> code:
>>>
>>>   ServiceClient client = new ServiceClient();
>>>   Options options = new Options();
>>>   options.setAction("invoke");
>>>   options.setUserName("system");
>>>   options.setPassword("manager");
>>>   options.setTo(new EndpointReference(wsServerUrl + "services/ABS"));
>>>   client.setOptions(options);
>>>   client.engageModule("rampart");
>>>   OMElement response = client.sendReceive(getPayload(args));
>>>
>>> Following is my services.xml:
>>>
>>> http://www.abc.com/webservice";>
>>> Service description for ABS
>>> >> schemaNamespace="http://www.abc.com/webservice"/
>>> >
>>> ABS
>>> true
>>> 
>>> >> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>> 
>>> 
>>> 
>>> 
>>> UsernameToken
>>> web.ws.control.PWCBHandler
>>> 
>>> 
>>> 
>>>  
>>>   UsernameToken
>>>
>>>   web.ws.control.PWCBHandler
>>>  
>>> 
>>> 
>>>
>>> Any idea?
>>>
>>> Chinmoy
>>>
>>
>>
>>
>> --
>> Nandana Mihindukulasooriya
>> WSO2 inc.
>>
>> http://nandana83.blogspot.com/
>> http://www.wso2.org
>>
>
>


Axis and users.lst path

2009-07-16 Thread Godel David
Hello,
I am trying to set up a small part of security in my web application which 
integrates AXIS (OpenHealthTool). So axis is used as jar and not as a  "whole 
web application"
I want to use the default SimpleAuthenticationHandler with the users.lst.

My question is: where must I put the users.lst file in order that AXIS finds 
it? I try in /my-web-app/WEB-INF but it doen't work...

Thank you in advance for your answers!
David



Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

2009-07-16 Thread Nandana Mihindukulasooriya
Hi Phillip,
Can you try with Rampart SNAPSHOT which can be found here [1].

thanks,
Nandana

[1] -
http://builder.wso2.org/browse/RAMPART-NIGHTLY-584/artifact/rampart-binary/rampart-dist-SNAPSHOT-bin.zip

On Thu, Jul 16, 2009 at 9:25 AM, cbr600 wrote:

>
> Hi Nan,
>
> I copied the bcprov-jdk16-143.jar to AXIS_HOME/lib but then the client gave
> me this error
>
> [java] Caused by: java.lang.ClassNotFoundException:
> edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
>
> I googled and found this link:
>
> http://javacio.us/search?q=edu%2Femory%2Fmathcs%2Fbackport%2Fjava%2Futil%2Fconcurrent%2Flocks%2FReadWriteLock+more%3Ajar_files&inline=true
>
> It could be a silly questions but which jar should I add this time?
>
> Any help or suggestions would be greatly appreciated.
>
> Regards,
> Phillip
>
>
> cbr600 wrote:
> >
> > Hi,
> >
> > I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> > downloaded from this link:
> > Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
> >
> > The service and the STS works fine after fixing few things in the
> > build.xml (please see below):
> >
> >
> -
> > property name="addressing.mar" value="addressing-1.5.mar"
> > property name="rampart.mar" value="rampart-1.4.mar"
> > property name="rahas.mar" value="rahas-1.4.mar"
> >
> -
> >
> > But when I run the client, the program threw exception as following:
> >
> >
> -
> > C:\Documents and
> > Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> > samples\policy>"C:\Documents and
> > Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> > bin\apache-ant-1.7.1\bin\ant" client.06
> > Buildfile: build.xml
> >
> > check.dependency:
> >
> > client.06:
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> >
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> > modules
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> >
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> > modules
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> > part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> > part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> > [java] log4j:WARN No appenders could be found for logger
> > (org.apache.axis2.
> > deployment.FileSystemConfigurator).
> > [java] log4j:WARN Please initialize the log4j system properly.
> > [java] Exception in thread "main" org.apache.axis2.AxisFault: Error in
> > crea
> > ting an encrypted key
> > [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> > .java:70)
> > [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
> > [java] at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251
> > )
> > [java] at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:416)
> > [java] at org.apache.axis2.description.OutInAxisOperationClient.send(Ou
> > tInAxisOperation.java:402)
> > [java] at org.apache.axis2.description.OutInAxisOperationClient.execute
> > Impl(OutInAxisOperation.java:229)
> > [java] at org.apache.axis2.client.OperationClient.execute(OperationClie
> > nt.java:165)
> > [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> > nt.java:539)
> > [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> > nt.java:520)
> > [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> > n Source)
> > [java] Caused by: org.apache.rampart.RampartException: Error in creating
> > an
> > encrypted key
> > [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> > der(BindingBuilder.java:228)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> > ptedKey(SymmetricBindingBuilder.java:697)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> > reEncrypt(SymmetricBindingBuilder.java:422)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> > etricBindingBuilder.java:90)
> > [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> > 44)
> > [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> > .java:64)
> > [java] ... 9 more
> > [java] Caused by: org.apache.ws.security.WSSecurityException: An
> > unsupporte
> > d signature or encryption algorithm was used (unsupported key transport
> > encrypti
> > on algorithm: No such algorithm:
> > http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> > )
> > [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> > WSSecurityUtil.java:689)
> > [java] at org.apache.ws.securit

[axis2:malfunction in two service calls]

2009-07-16 Thread Rajneesh Kumar
Hi All,

 

I have two axis2 services - one is MTOM based (for file transfer) and other
is without MTOM processing text/xml data. Client app is written in .net
which first call the MTOM service and upload a file on the server
successfully and based upon the returned response invoke other service to do
other operations. When I use the second service with hardcoded response with
a test java client it works but fails in the .net client case where MTOM
service is also called before its invocation.

 

Summary:

If both services called independently executes well but if called in one
client app the second service fails.

 

 

The error trace log is:

 

{System.InvalidOperationException: Client found response content type of
'multipart/related;
boundary=MIMEBoundaryurn_uuid_5EE71B3F2E4D475A341247778833563;
type="application/xop+xml";
start="<0.urn:uuid:5ee71b3f2e4d475a341247778833...@apache.org>";
start-info="text/xml"', but expected 'text/xml'.

The request failed with the error message:

--

--MIMEBoundaryurn_uuid_5EE71B3F2E4D475A341247778833563

Content-Type: application/xop+xml; charset=utf-8; type="text/xml"

Content-Transfer-Encoding: binary

Content-ID: <0.urn:uuid:5ee71b3f2e4d475a341247778833...@apache.org>

 

http://schemas.xmlsoap.org/soap/envelope/";>http://ws.v1a.com";>

--MIMEBoundaryurn_uuid_5EE71B3F2E4D475A341247778833563--

--.

   at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

   at WindowsApplication1.Zoeindex.V1AWebService.zoeIndex(String name,
String password, String fileName) in D:\V1AService\WindowsApplication1\Web
References\Zoeindex\Reference.cs:line 270

   at WindowsApplication1.V1A.Upload(String strFile) in
D:\V1AService\WindowsApplication1\V1A.cs:line 85}

 

Response is much awaited.

 

Thanks in advance,

-Rajneesh



===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


Re: Rampart error (Incoming message does not contain required Security header)

2009-07-16 Thread Chinmoy Chakraborty
Hi Nandana,

Thanks a lot for the reply. Now I am getting following error:

org.apache.axis2.deployment.DeploymentException: The "Dispatch" phase is not
found on the global "InFlow" phase of the axis2.xml file. Make sure the
phase is within the axis2.xml file.
 at
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:158)
 at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:133)
 at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:68)
 at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:184)

My client code is:

try {
  ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("D:/Codes/weblims3/exploded/WEB-INF",
"D:/Codes/weblims3/axis2.xml");
  } catch (AxisFault axisFault) {
  axisFault.printStackTrace();
  }
 The error is happening in the previous line. What does it meant by
"Repository Path"? Please find attached axis2.xml.

Chinmoy







On Thu, Jul 16, 2009 at 9:27 AM, Nandana Mihindukulasooriya <
nandana@gmail.com> wrote:

> Hi Chinmoy,
> As it seems, you don't have the "OutflowSecurity" parameter defined
> in the client side. So basically you need to have a client side axis2 with
> that parameter and then create a ConfigurationContext out of it. Rampart
> basic sample 01 shows how to do this [1],[2]. But you won't be able to pass
> username/password through options when you use parameter based
> configuration. Is there a possibility for you to use policy based
> configuration. If so, please look at following tutorial [2].
>
> regards,
> Nandana
>
> [1] -
> https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/client.axis2.xml
> [2] -
> https://svn.apache.org/repos/asf/webservices/rampart/trunk/java/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java
> [3] - https://www.wso2.org/library/3190
>
>
> On Wed, Jul 15, 2009 at 5:45 PM, Chinmoy Chakraborty wrote:
>
>> Hi,
>>
>> I am getting following error while trying to invoke a WS-Security enabled
>> client request:
>>
>> org.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not
>> contain required Security header
>>  at
>> org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:221)
>>  at
>> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:86)
>>  at
>> org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
>>  at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>>  at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>>  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>>
>> I am missing something I know but not sure what. Following is my client
>> code:
>>
>>   ServiceClient client = new ServiceClient();
>>   Options options = new Options();
>>   options.setAction("invoke");
>>   options.setUserName("system");
>>   options.setPassword("manager");
>>   options.setTo(new EndpointReference(wsServerUrl + "services/ABS"));
>>   client.setOptions(options);
>>   client.engageModule("rampart");
>>   OMElement response = client.sendReceive(getPayload(args));
>>
>> Following is my services.xml:
>>
>> http://www.abc.com/webservice";>
>> Service description for ABS
>> > schemaNamespace="http://www.abc.com/webservice"/
>> >
>> ABS
>> true
>> 
>> > class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>> 
>> 
>> 
>> 
>> UsernameToken
>> web.ws.control.PWCBHandler
>> 
>> 
>> 
>>  
>>   UsernameToken
>>
>>   web.ws.control.PWCBHandler
>>  
>> 
>> 
>>
>> Any idea?
>>
>> Chinmoy
>>
>
>
>
> --
> Nandana Mihindukulasooriya
> WSO2 inc.
>
> http://nandana83.blogspot.com/
> http://www.wso2.org
>


	
	
	
	
	UsernameToken
	system
	labware.web.ws.control.PWCBHandler
  	

	
true
true




HTTP/1.0


   

 





































































Deserializer problem with varying data types in data tables tansfered via SOAP

2009-07-16 Thread Jürgen Kaatz
Hi,

I have a problem with the Axis serializer/deserilaizer. Perhaps this is an 
offtopic item, but it would be very nice if someone can give any useful hints.

That's what I wanna to do:
I want to transfer statistical reports via SOAP. This several reports vary in 
the amount of columns and - that's the problem - they vary in the column data 
types (eg report A, column 1 is a string; report B, column 1 is an integer; 
...). 

That's what I have done:
First I declare the data type for the column values in the WSDL with 'anyType' 
and set the 'real' data type of the column at runtime to 'string', 'integer', 
'float' or 'date'. This works on several clients (JAX-WS, C#, PHP...) but not 
on Axis 1.4 (see error message below).

I want to know, if there is a better solution to declare and handle varying 
data types in a data table transferred via SOAP. What I have to declare in the 
WSDL and what kind of type I have to set at runtime?

Bye Juergen

Axis error message:
AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException [^]
  faultSubcode:
  faultString: org.xml.sax.SAXException: No deserializer for string
  faultActor:
  faultNode:
  faultDetail:
  {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: [^] No 
deserializer for string
  at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:314)
  at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
  at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
  at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
  at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
  at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
  at org.apache.axis.client.Call.invoke(Call.java:2448)
  at org.apache.axis.client.Call.invoke(Call.java:2347)
  at org.apache.axis.client.Call.invoke(Call.java:1804)



RE: Error in download web pages

2009-07-16 Thread Neil Youngman
Neil Youngman wrote:
>
> The link labeled "1.4.1" at http://ws.apache.org/axis2/download.cgi points to 
> http://ws.apache.org/axis2/download/1_5/download.cgi. I assume this should be 
> http://wsapache.org/axis2/download/1_4_1/download.cgi.

Some of the documentation links in the sidebar seem to be broken as well.

If I start from http://ws.apache.org/axis2/ and click on Documentation->Version 
1.4.1 I get http://ws.apache.org/axis2/1_4_1/contents.html, which seems OK. 
OTOH, if I click on Releases->1.5, I get taken to 
http://ws.apache.org/axis2/download/1_5/download.cgi and from there 
Documentation->Version 1.4.1 links to 
http://ws.apache.org/axis2/download/1_5/1_4_1/contents.html, which produces a 
"not found" error page.

Neil Youngman
<>

Error in download web pages

2009-07-16 Thread Neil Youngman
The link labeled "1.4.1" at http://ws.apache.org/axis2/download.cgi points to 
http://ws.apache.org/axis2/download/1_5/download.cgi. I assume this should be 
http://ws.apache.org/axis2/download/1_4_1/download.cgi.

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England & Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

<>

Re: New Line character is escaped in the created SOAP message in Axis2 1.4 web service.

2009-07-16 Thread Andreas Veithen
Yuri,

This is actually the correct behavior. There is a discussion in
WSCOMMONS-243 [1] and WSTX-94 [2] about why this is so. If you need to
override this behavior, you may use the feature introduced by
WSCOMMONS-461.

Andreas

[1] https://issues.apache.org/jira/browse/WSCOMMONS-243
[2] http://jira.codehaus.org/browse/WSTX-94

On Wed, Jul 15, 2009 at 04:11, iuriep wrote:
>
> Hello,
>
> I have implemented a web service and deployed it on Apache Axis2 1.4
>
> One of the XML elements (Payload element) declared as XML type 'String' may
> include text containing CRLF (carriage-return, linefeed) character sequence.
>
> The problem is that CRLF character sequence is normalized by Axis into #xD.
> The LF character is escaped in the output.
>
> The Java code used to serialize the content of Payload element was generated
> by WSDL2Java tool and looks like this:
>
> public void serialize(final QName parentQName,
>                          final OMFactory factory,
>                          MTOMAwareXMLStreamWriter xmlWriter,
>                          boolean serializeType)
>            throws XMLStreamException, ADBException {
>
>        protected String localPayload;
>        ...
>        if (localPayload == null) {
>            // write the nil attribute
>            throw new ADBException(PAYLOAD_CANNOT_BE_NULL);
>        } else {
>            xmlWriter.writeCharacters(localPayload);
>        }
>        ...
> }
>
> In the tcpmonitor the SOAP message that is being sent looks like:
>
> POST /axis2/services/Core/realtime/?OrgTaskID=100303 HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8;
> action="RealTimeTransaction"
> User-Agent: Axis2
> Host: iuriep-ws:8079
> Transfer-Encoding: chunked
>
> 
>    xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>      
>          xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> soapenv:mustUnderstand="true">
>             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="UsernameToken-29624571">
>               user100303
>                Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText";>kL1dVUPf5U
>            
>         
>      
>      
>          xmlns:ns1="http://www.caqh.org/SOAP/WSDL/CORERule2.0.1.xsd";>
>            X12_276_004010X093A1
>            RealTime
>            a7cea1a0-6cb9-11de-8782-000c2987b7be
>            2009-07-09T06:52:30Z
>            EDIFECS TSK0021
>            987654321
>            2.0.1
> ISA*00*00*987654321*0652*0*P*:#xD;GS*HR*TSK0021*004010X093A1#xD;ST*276*0001#xD;BHT*0010*13**4*3*22*0#xD;DMG*D8*19821103*M#xD;NM1*IL*1*PULSIPHER*BILL*K***MI*5643796#xD;TRN*1*ICN98765432#xD;REF*1K*DCN123467#xD;AMT*T3*2312#xD;DTP*232*RD8*20080401-20080430#xD;SE*16*0001#xD;GE*1*11112#xD;IEA*1*11112#xD;
>         
>      
>   
>
>
> I have used WSDL2java tool to generate the stubs, skeletons, and data types
> from WSDL
> I am also using the Pampart 1.4 module to include security headers into the
> SOAP message.
>
> Thanks in advance for any suggestion,
> Yuri
> --
> View this message in context: 
> http://www.nabble.com/New-Line-character-is-escaped-in-the-created-SOAP-message-in-Axis2-1.4-web-service.-tp24490808p24490808.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>