Re: Axis2 with rampart sample, username hardcoded

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Jason,
 What are the Axis2 and Rampart versions that you are using ?

thanks,
/nandana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2 with rampart sample, username hardcoded

2008-03-30 Thread jason zhang

Hi, Nandana
I used this poicy in my service.xml, deployed the service. I then 
generated stub using wsdl which contains the policy element.


My client code is like this
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo_dir, 
null);

   stub = new net.sf.webcommand.ws.client.ProgramwsStub(ctx,
   "http://localhost:9090/cmdportal1/services/programws";);
   ServiceClient sc=stub._getServiceClient();  
   sc.engageModule("rampart");

   Options options = sc.getOptions();
   options.setUserName("apache");
   options.setPassword("password");
 
But the client does not send the username and password. It just sends an 
empty security header.  This header is like this


xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; 
soapenv:mustUnderstand="true" />


any suggestion?

thanks

-jason


Nandana Mihindukulasooriya wrote:

Hi Jason,
   You need to have that Username Token assertion inside a
supporting token assertion.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>


  

   

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





But here the password is in clear text. If you are using Rampart
SNAPSHOT , you can use WS Security Policy 1.2 to send the hashed
password. The policy for that is given below.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";

xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>


  


  
  
  
  

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





thanks,
/nandana

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting up SecureConversation

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Micheal,

>  I would like to use Ws-Secureconversation to sign messages (I will be using
>  one-way SSL to encrypt)

In Secure Conversation, we create a security context ( Security
Context Token ) and use the keys derived from that to sign and encrypt
messages. So there are 2 steps. First we send a request to the web
service to the web service with some claims and establish a security
context. Then we use that context to derive keys to secure the actual
messages to consume the web service. So does this fit in to your
scenario ? Are you going to expose your web service through SSL ?

>  I am using WSO2 WSAS and have setup a security configuration for my service
>  (this is a wizard that defines the service's policy) and keystore in the
>  WSAS management console.. but i can't figure out the next step..

In WSAS, there are pre-defined policies for Secure Conversation. In
WSAS 2.2, scenarios 9 - 15 are Secure Conversation scenarios. So if
you choose a secure conversation scenario and assign key stores,
that's it. It is easy as that.

>  According to this Axis2 book that I am using, the policies need to be added
>  to the WSDL so that the axis2 codegen will include the policy information in
>  the generated code...however the book does not cover secure conversation.

In secure conversation also it is the same. When you apply the policy
using the security configuration, those will appear on the generated
WSDL. So Axis2 code generator can make use of those policies when
generating stubs for the web service.
So to consume this service, all you need to do is add the
RampartConfig assertion to the the Stub and call the service. Rampart
will handle establishing the security context according to the given
policy transparently and the client need not to worry about that.

thanks,
/nandana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2] Renaming ServiceGroupId

2008-03-30 Thread Deepal jayasinghe



Hi all,

I am currently getting started in the session handling with axis2. 
When I am using the soapsession approach, axis2 generates the 
following header in the SOAP response.


xmlns:axis2=”http://ws.apache.org/namespaces/axis2”>...axis2:ServiceGroupId>


Now what I want to do is customizing this tag in order to reflect that 
this Id belongs to my application. I want to rename it to eg:


http://example.com”>…

Is there any configurative way to do this which does not involve 
actually changing the axis2 sources?


Not at the moment. But that is something we can easily do , please 
create a JIRA then we may fix that for next Axis2 release (not for 1.4)


-Deepal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Documentation tuning Axis2 webservices?

2008-03-30 Thread Deepal jayasinghe





Is there any documentation on how to tune Axis2 webservices,
Well not at Apache Axis2 level , but I can point you to some other open 
source project which does that using Axis2 [1]


[1] : http://wso2.org/projects/commons/throttle

Thank you!
Deepal

e.g. if we have 2 we



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: add & get parameter from context in servicegroup

2008-03-30 Thread Deepal jayasinghe

Michelantonio Trizio wrote:

Hello,

I'm just working with Servicegroup.
But I can't get parameter that I have had to the same contextgroup.
I'd like to do something like this:

On service1

AxisServiceGroup 
asg=MessageContext.getCurrentMessageContext().getAxisServiceGroup();

asg.addParameter("utonto", user1);

On service2

AxisServiceGroup 
asg=MessageContext.getCurrentMessageContext().getAxisServiceGroup();

  String utonto=asg.getParameter("utono").toString();

The services.xml is write fine, but when I print utonto in service2 
return me null.

What shall I do?
If you have added the parameter in the service level (in the 
services.xml) then you need to get that from the AxisService , not from 
the service group.


Thank  you!
Deepal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Micheal,

>  what is the difference between these to methods of adding a policy?
>  
> service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
>  rampConfigPolicy);

If you set the policy like this, it will add the assertions to the
existing policy. In your case, this is the correct approach as that is
what you want, add the RampartConfig Assertion to the existing policy.

>  
> service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);

If you set the policy like this, it will override the other policies
and Rampart will consider only the "KEY RAMPART POLICY". In your
scenario , this not the way to go. But when you load the complete
policy using a xml file, this approach can be used.

-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with xs:pattern and IsBasicLatin

2008-03-30 Thread Andreas Veithen

Andreas,

The problem comes from the fact that in the XML Schema specification,  
Unicode character blocks are matched by "\p{Is...}" [1], whereas Java  
expects "\p{In...}" [2]. Replacing your pattern by  
"[\p{InBasicLatin}\p{InLatin-1Supplement}]+" should work, but then  
your XSD is no longer compliant. You should raise a JIRA for this  
issue. In the meantime a pragmatic solution could be to write a script  
that replaces "\p{Is" by "\p{In" before feeding the schema to wsdl2java.


Regards,

Andreas


[1] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#nt-IsBlock
[2] http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

Quoting "Weck, Andreas" <[EMAIL PROTECTED]>:


Hallo,

i have the following type-definition in a webservice:


  



  




This generates me a class ( with wsdl2java) with the method:
public void setVerantwortlichePerson_type0(java.lang.String param) {
if
(java.lang.String.valueOf(param).matches("[\\p{IsBasicLatin}\\p{IsLatin-
1Supplement}]+")) {
this.localVerantwortlichePerson_type0 = param;
} else {
throw new java.lang.RuntimeException();
}
}

and if i run my appliction and call the method
setVerantwortlichePerson_type0("Andreas") i get the following Exception:
Exception in thread "main" java.util.regex.PatternSyntaxException:
Unknown character property name {BasicLatin} near index 16
[\p{IsBasicLatin}\p{IsLatin-1Supplement}]+
  ^
So what is here wrong? Can somebody help me???
Regards,
Andreas









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-30 Thread Anne Thomas Manes
Sorry -- I should have validated it for you. I made a few errors. This
version has been validated:


http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="urn:TestSearchEngine"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>

http://www.w3.org/2001/XMLSchema";>





















































http://schemas.xmlsoap.org/soap/http"/>












http://localhost:8080/axis/services/wsTestsearchdetails"/>





On Sun, Mar 30, 2008 at 8:38 AM, sh_santosh <[EMAIL PROTECTED]> wrote:
>
>  Hi Anne,
>
>  while i generate wsdl2java i got this exception :
>
>  java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
>  referenced but not defined.
> at
>  
> org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
> at 
> org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
> 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:595)
>
>   For Testing purpose, i want to take 2 argument and return a result. while
>  run wsdl2java i got exception.
>  is this related to beanMapping or typeMapping
>  or something missing in WSDL
>
>  please see wsdl :
>
>
> 
>   xmlns="http://schemas.xmlsoap.org/wsdl/";
> xmlns:tns="urn:TestSearchEngine"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
>
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>
> 
>  elementFormDefault="unqualified">
>
>
> 
> 
> 
>  maxOccurs="1"
> name="arg1" 
> type="xsd:int" />
>  maxOccurs="1"
> name="arg2" 
> type="xsd:int" />
> 
> 
> 
>
>
> 
> 
> 
>  maxOccurs="1"
> name="addResult" 
> type="xsd:int" />
> 
> 
> 
> 
>
>
> 
>
> 
> 
> 
>
> 
> 
> 
>
> 
> 
>  name="searchTestRequest" />
>  name="searchTestResponse" />
> 
> 
>
>  type="tns:TestSearchEngineInterface">
>  transport="http://schemas.xmlsoap.org/soap/http"; />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
>  name="wsTestsearchdetails">
>  
> location="http://localhost:8080/axis/services/wsTestsearchdetails"; />
> 
> 
>  
>
>
>
> Thanx
>
>
>  Anne Thomas Manes wrote:
>  >
>
>
> > Given that you must send a specific XML document, I recommend that you
>  > use the WSDL-first approach rather than the code-first approach. As I
>  > said in my previous post, you should start by defining a schema that
>  > describes your i

axisFault "error in extracting message properties" with SecureConv-SignOnly/WSO2 WSAS 2.2.1

2008-03-30 Thread mikle

I am getting the following error on the WSAS console:
 INFO [2008-03-30 18:35:49,484]  Verification successful for URI
"#Id-4339206"
 INFO [2008-03-30 18:35:49,484]  Verification successful for URI
"#Timestamp-32207230"
 INFO [2008-03-30 18:35:49,500]  org.apache.axis2.AxisFault: Error in
extracting message properties

I'm also attaching the securecontexttoken request and actual request:
http://www.nabble.com/file/p16384767/SecureContextRequest.txt
SecureContextRequest.txt 
http://www.nabble.com/file/p16384767/actualrequest.txt actualrequest.txt 

Any idea what the prob is?

I found this post for the same error but its for WSAS 2.1 
http://wso2.org/forum/thread/2615

My WSDL & code can be found here:
http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-td16380606.html

Thanks,

Michael
-- 
View this message in context: 
http://www.nabble.com/axisFault-%22error-in-extracting-message-properties%22-with-SecureConv-SignOnly-WSO2-WSAS-2.2.1-tp16384767p16384767.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread mikle

Not sure if its against the mailing list rules... another q...

what is the difference between these to methods of adding a policy?

service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
rampConfigPolicy);   

service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);
 
the last entry in the axis log when using addPolicyElement is:
2008-03-30,12:42:43,687 DEBUG: org.apache.rampart.MessageBuilder.build
Building SymmetricBinding
2008-03-30,12:42:43,703 DEBUG:
org.apache.rampart.builder.SymmetricBindingBuilder.build
SymmetricBindingBuilder build invoked
2008-03-30,12:42:43,703 DEBUG:
org.apache.rampart.builder.BindingBuilder.addTimestamp Adding timestamp

When using getConfigurationContext.setProperty the last log entry is:
2008-03-30,12:28:24,656 DEBUG:
org.apache.rampart.builder.AsymmetricBindingBuilder.build
AsymmetricBindingBuilder build invoked

-- 
View this message in context: 
http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16382896.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread mikle

ok i think its ok now..

jaxen was not referenced!! 
-- 
View this message in context: 
http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16382737.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread mikle

Here's the stack trace:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/jaxen/JaxenException
at
org.apache.rampart.builder.BindingBuilder.addTimestamp(BindingBuilder.java:86)
at
org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:68)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:128)
at 
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
org.mch.clearinghouse.client.ClearingHouseServiceStub.getChequeImages(ClearingHouseServiceStub.java:4142)
at org.mch.bankclient.TestConsoleClient.main(TestConsoleClient.java:49)
Caused by: java.lang.ClassNotFoundException: org.jaxen.JaxenException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 12 more


Nunny wrote:
> 
> Hi Michael,
> Configuration seems ok. Can you post the WSDL and the stack
> trace of the Exception ?
> 
> thanks,
> /nandana
> 
> On 3/30/08, mikle <[EMAIL PROTECTED]> wrote:
>>
>> I am getting a JaxenException in the client stub on
>> "_operationClient.execute(true);"
>>
>> I started getting this exception after i setup the client to use rampart.
>>
>> ConfigurationContext context =
>> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository");
>> ClearingHouseServiceStub service = new ClearingHouseServiceStub(context,
>> this.jTextFieldMain_EndPoint.getText());
>> service._getServiceClient().engageModule("rampart");
>>
>> Properties properties = new Properties();
>> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.type",
>> "JKS");
>> properties.setProperty("org.apache.ws.security.crypto.merlin.file",
>> jTextFieldMain_KeyStore.getText());
>> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.password",
>> String.valueOf(jPasswordKeystoreMain_Password.getPassword()));
>>
>> CryptoConfig signcryptoInfo = new CryptoConfig();
>> signcryptoInfo.setProvider(Merlin.class.getName());
>> signcryptoInfo.setProp(properties);
>>
>> CryptoConfig encryptcryptoInfo = new CryptoConfig();
>> encryptcryptoInfo.setProvider(Merlin.class.getName());
>> encryptcryptoInfo.setProp(properties);
>>
>> RampartConfig config = new RampartConfig();
>> config.setUser(jTextFieldMain_KeystoreAlias.getText());
>> config.setEncryptionUser("service");
>> config.setPwCbClass("org.mch.bankclient.security.PWCBHandler");
>> config.setSigCryptoConfig(signcryptoInfo);
>> config.setEncrCryptoConfig(encryptcryptoInfo);
>>
>> Policy rampConfigPolicy = new Policy();
>> rampConfigPolicy.addAssertion(config);
>>
>>
>> service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
>> rampConfigPolicy);
>> //service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);
>>
>> the last entry in the axis log when using addPolicyElement is:
>> 2008-03-30,12:42:43,687 DEBUG: org.apache.rampart.MessageBuilder.build
>> Building SymmetricBinding
>> 2008-03-30,12:42:43,703 DEBUG:
>> org.apache.rampart.builder.SymmetricBindingBuilder.build
>> SymmetricBindingBuilder build invoked
>> 2008-03-30,12:42:43,703 DEBUG:
>> org.apache.rampart.builder.BindingBuilder.addTimestamp Adding timestamp
>>
>> When using getConfigurationContext.setProperty the last log entry is:
>> 2008-03-30,12:28:24,656 DEBUG:
>> org.apache.rampart.builder.AsymmetricBindingBuilder.build
>> AsymmetricBindingBuilder build invoked
>>
>> Is there something wrong with the way i am configuring rampart?
>>
>> Michael
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16380606.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> --
> Nandana Mihindukulasooriya
> WSO2 inc.
> 
> http://nandana83.blogspot.com/
> http://nandanasm.w

Re: Interop WCF Service/Axis2 Client and Stream

2008-03-30 Thread Thilina Gunarathne
Hi,
It looks like a bug in Axis2 Data binding, in the simple type
restriction... Please log a JIRA[1] with your wsdl's and the message
traces..

thanks,
Thilina

[1]https://issues.apache.org/jira/browse/AXIS2

On Fri, Mar 28, 2008 at 8:31 AM, Andreas Necker
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  2008/3/19, Thilina Gunarathne <[EMAIL PROTECTED]>:
>
> > Hi,
>  > Looks like a data binding issue.. If possible please post a message stack
>  > trace of the response.
>  >
>  I've captured the messages with Microsofts netmon:
>
>  Client Request:
>  ---
>  - HTTP: Request, POST /DmsBatch/FileTransfer/
>   - Request:
>  Command: POST
>+ URI: /DmsBatch/FileTransfer/
>  ProtocolVersion: HTTP/1.1
>  ContentType:  text/xml; charset=UTF-8
>  SOAPAction:
>
> "http://www.dummy.de/DmsService/IFileTransfer/CheckOutDocument";
>  UserAgent:  Axis2
>  Host:  ntfe:8013
>  ContentLength:  427
>  HeaderEnd: CRLF
>   - payload: HttpContentType =  text/xml; charset=UTF-8
>- XmlPayload:
>   
> -   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>  - 
>   - 
>  aeacd9ad-52c6-42fe-b546-1a7959da606b
>  
> 
>  - 
>   - http://www.dummy.de/DmsService";>
>- 
>   408848
>   
>  
> 
>
>  ---
>
>  Service Response 1:
>  ---
>  - HTTP: Response, HTTP/1.1, Status Code = 200
>   - Response:
>  ProtocolVersion: HTTP/1.1
>  StatusCode: 200, Ok
>  Reason: OK
>  TransferEncoding:  chunked
>  ContentType:  multipart/related;
>  
> type="application/xop+xml";start="";boundary="uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9";start-info="text/xml"
>  Server:  Microsoft-HTTPAPI/1.0
>  MIME-Version:  1.0
>  Date:  Fri, 28 Mar 2008 08:50:13 GMT
>  HeaderEnd: CRLF
>   - payload: HttpContentType =  multipart/related;
>  
> type="application/xop+xml";start="";boundary="uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9";start-info="text/xml"
>- XmlPayload:
>   225
>
>  --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9
>  Content-ID:
> - 
>
>  Content-Transfer-Encoding: 8bit
>  Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
>
>
>  - http://schemas.xmlsoap.org/soap/envelope/";>
>   - 
>- http://www.dummy.de/DmsService";>
> - 
>  href="cid:http%3A%2F%2Ftempuri.org%2F1%2F633422946136935910"
>  xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
>
>   
>  
> 
>  ---
>
>  Service Response 2:
>  ---
>  - HTTP: HTTP Payload
>   - payload: HttpContentType =
>  Body: 4000
>  Body:
>  Body: --uuid:99a8dc80-2ed9-4a0e-abf8-438bf117ca1c+id=9
>  Body: Content-ID: 
>  Body: Content-Transfer-Encoding: binary
>  Body: Content-Type: application/octet-stream
>  ...
>  ---
>
>
>  > Also what's the Axis2 version you are using.. Axis2 1.3 has the following
>  > known bug, which is fixed in the head..
>  >  https://issues.apache.org/jira/browse/AXIS2-3196
>  >
>  > Axis2 supports MTOM and it has proven interoperability with .net except for
>  > the above mentioned bug which appeared in Axis2 1.3 as a result of a
>  > optimization..
>  >
>  I'm on Axis2 version 1.3.
>
>  Thanks
>  Andreas
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread mikle

I am using the signonly/secureconv policy template provided in WSAS... I
added the policy to the WSDL and inserted a policy reference to the binding
element..

I also tried removing the policy from the WSDL and saving the policy into an
xml file..like in the rampart samples.. but i got the same exception.

The error is generated from the AWT-Queue thread... I'll try create a client
without ui... will get back to you with the stack trace..

Thanks,

Mike

http://www.nabble.com/file/p16381908/ClearingHouseService.wsdl
ClearingHouseService.wsdl 
-- 
View this message in context: 
http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16381908.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Rampart/Secureconv > JaxenException

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Michael,
Configuration seems ok. Can you post the WSDL and the stack
trace of the Exception ?

thanks,
/nandana

On 3/30/08, mikle <[EMAIL PROTECTED]> wrote:
>
> I am getting a JaxenException in the client stub on
> "_operationClient.execute(true);"
>
> I started getting this exception after i setup the client to use rampart.
>
> ConfigurationContext context =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository");
> ClearingHouseServiceStub service = new ClearingHouseServiceStub(context,
> this.jTextFieldMain_EndPoint.getText());
> service._getServiceClient().engageModule("rampart");
>
> Properties properties = new Properties();
> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.type",
> "JKS");
> properties.setProperty("org.apache.ws.security.crypto.merlin.file",
> jTextFieldMain_KeyStore.getText());
> properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.password",
> String.valueOf(jPasswordKeystoreMain_Password.getPassword()));
>
> CryptoConfig signcryptoInfo = new CryptoConfig();
> signcryptoInfo.setProvider(Merlin.class.getName());
> signcryptoInfo.setProp(properties);
>
> CryptoConfig encryptcryptoInfo = new CryptoConfig();
> encryptcryptoInfo.setProvider(Merlin.class.getName());
> encryptcryptoInfo.setProp(properties);
>
> RampartConfig config = new RampartConfig();
> config.setUser(jTextFieldMain_KeystoreAlias.getText());
> config.setEncryptionUser("service");
> config.setPwCbClass("org.mch.bankclient.security.PWCBHandler");
> config.setSigCryptoConfig(signcryptoInfo);
> config.setEncrCryptoConfig(encryptcryptoInfo);
>
> Policy rampConfigPolicy = new Policy();
> rampConfigPolicy.addAssertion(config);
>
>
> service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
> rampConfigPolicy);
> //service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);
>
> the last entry in the axis log when using addPolicyElement is:
> 2008-03-30,12:42:43,687 DEBUG: org.apache.rampart.MessageBuilder.build
> Building SymmetricBinding
> 2008-03-30,12:42:43,703 DEBUG:
> org.apache.rampart.builder.SymmetricBindingBuilder.build
> SymmetricBindingBuilder build invoked
> 2008-03-30,12:42:43,703 DEBUG:
> org.apache.rampart.builder.BindingBuilder.addTimestamp Adding timestamp
>
> When using getConfigurationContext.setProperty the last log entry is:
> 2008-03-30,12:28:24,656 DEBUG:
> org.apache.rampart.builder.AsymmetricBindingBuilder.build
> AsymmetricBindingBuilder build invoked
>
> Is there something wrong with the way i am configuring rampart?
>
> Michael
>
> --
> View this message in context:
> http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16380606.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-30 Thread sh_santosh

Hi Anne,

while i generate wsdl2java i got this exception :

java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
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:595)

 For Testing purpose, i want to take 2 argument and return a result. while
run wsdl2java i got exception.
is this related to beanMapping or typeMapping
or something missing in WSDL

please see wsdl :


http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="urn:TestSearchEngine"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>








































http://schemas.xmlsoap.org/soap/http"; />













http://localhost:8080/axis/services/wsTestsearchdetails"; />





Thanx


Anne Thomas Manes wrote:
> 
> Given that you must send a specific XML document, I recommend that you
> use the WSDL-first approach rather than the code-first approach. As I
> said in my previous post, you should start by defining a schema that
> describes your input and output elements and then construct a WSDL
> that defines an operation for sending and receiving those elements. An
> example follows. A couple of notes on the WSDL I developed for you:
> 
> 1) I have defined a set of wrapper elements around your
>  and  elements. SOAP requires that the
> element within the SOAP Body be namespace qualified. Your
>  and  elements are not qualified;
> therefore you should wrap them in a namespace qualified element. The
> wrapper elements are called "searchTest" and "searchTestResponse" to
> correspond to the operation name. This WSDL conforms to the "wrapped"
> document/literal convention, so Axis will automatically strip off the
> wrapper elements for you.
> 
> 2) You didn't give me the complete details for your response element.
> If the  element contains child elements, then you will
> need to redefine the schema for that element.
> 
> Once you have finalized the WSDL, run wsdl2java with the -s option to
> generate your client stub and server skeleton. It will also generate a
> WSDD for you.
> 
> Anne
> 
> 
>  xmlns="http://schemas.xmlsoap.org/wsdl/";
> xmlns:tns="urn:TestSearchEngine"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> 
> 
>   elementFormDefault="unqualified">
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
> 
>   
>   
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>  
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
>  
>  name="searchTestRequest"/>
>  name="searchTestResponse"/>
>  
>   
> 
>type="tns:TestSearchEngineInterface">
>  transport="http://schemas.xmlsoap.org/soap/http"/>
>
>   
>   
>  
>   
>   
>  
>   
>
> 
> 
> 
>   name="wsTestsearchdetails">
>   
> location="http://localhost:8080/axis/services/wsTestsearchdetails"/>
>  
>   
> 
> 
> Anne
> 
> On Sat, Mar 29, 2008 at 10:20 AM, sh_santosh <[EMAIL PROTECTED]>
> wrote:
>>
>>  Hi Anne,
>>
>>  Yes, i need to implement both client and server. as a input SOAP
>>  request inside SOAP body payload containing the
>>   element.
>>
>>   Yes, i have a sample document 

Re: Element is referenced but not defined

2008-03-30 Thread sh_santosh

 Hi all,
   I want to generate wsdl2java for Document literal web services for
Axis, java.
I am using this command to generate wsdl 2 java :
-o . -d Session -s -S true  -Nurn:TestSearchEngine
webservices.wsdoclittest.wstemp 
src/webservices/wsdoclittest/wstemp/TestServices.wsdl

But i got Exception :

java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
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:595)

Please see the WSDL :


http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="urn:TestSearchEngine"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>








































http://schemas.xmlsoap.org/soap/http"; />













http://localhost:8080/axis/services/wsTestsearchdetails"; />





Please advice on the issues.

Thanx Regards
Santosh



Anne Thomas Manes wrote:
> 
> The parameterOrder only applies to RPC style services in which you have
> more
> than one message part defined in your input message. Most tools won't
> object
> if you use parameterOrder in a document style service, but it your case,
> you
> specified a parameter that didn't exist. The parameterOrder attribute must
> reference message parts by their part name (in your case, "addPart", not
> "add"). If you specify "addPart", it should work. But as I said, it
> doesn't
> make sense in a document style service.
> 
> Anne
> 
> On 1/9/06, Shelli D. Orton <[EMAIL PROTECTED]> wrote:
>>
>> Thanks, that worked!
>>
>> Could you tell me why I needed to remove the parameterOrder attribute?  I
>> used another wsdl file (document/literal wrapped) as a template for this
>> one, and it uses the attribute and successfully works with wsdl2java.
>>
>> Shelli
>>
>> -Original Message-
>> *From:* Anne Thomas Manes [mailto:[EMAIL PROTECTED]
>> *Sent:* Monday, January 09, 2006 3:47 PM
>> *To:* axis-user@ws.apache.org
>> *Subject:* Re: Element is referenced but not defined
>>
>> You need to add the "xsd" prefix to your element definitions in your
>> schema:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>>
>> Should be:
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>>
>> Also, you must remove the parameterOrder attribute from the
>>  definition.
>>
>> Anne
>>
>> On 1/9/06, Shelli D. Orton <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to write wsdl in a document/literal wrapped style (yes, this
>> > is related to my earlier post for those who viewed it).  I have a pared
>> down
>> > version of the wsdl with only the one request that was giving me grief
>> in
>> > rpc/encoded style.  When I run wsdl2java, I get the following error:
>> >
>> > java.io.IOException: Element {
>> >
>> http://clearmode.com:80/ws/ConsumerProvision}addResponseis
>> referenced but not defined.
>> > at
>> > org.apache.axis.wsdl.symbolTab

Rampart/Secureconv > JaxenException

2008-03-30 Thread mikle

I am getting a JaxenException in the client stub on
"_operationClient.execute(true);"

I started getting this exception after i setup the client to use rampart.

ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("repository");
ClearingHouseServiceStub service = new ClearingHouseServiceStub(context, 
this.jTextFieldMain_EndPoint.getText());
service._getServiceClient().engageModule("rampart");

Properties properties = new Properties();
properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.type",
"JKS");
properties.setProperty("org.apache.ws.security.crypto.merlin.file",
jTextFieldMain_KeyStore.getText()); 
properties.setProperty("org.apache.ws.security.crypto.merlin.keystore.password",
String.valueOf(jPasswordKeystoreMain_Password.getPassword()));

CryptoConfig signcryptoInfo = new CryptoConfig();
signcryptoInfo.setProvider(Merlin.class.getName());
signcryptoInfo.setProp(properties);

CryptoConfig encryptcryptoInfo = new CryptoConfig();
encryptcryptoInfo.setProvider(Merlin.class.getName());
encryptcryptoInfo.setProp(properties);

RampartConfig config = new RampartConfig();
config.setUser(jTextFieldMain_KeystoreAlias.getText());
config.setEncryptionUser("service");
config.setPwCbClass("org.mch.bankclient.security.PWCBHandler");
config.setSigCryptoConfig(signcryptoInfo);
config.setEncrCryptoConfig(encryptcryptoInfo);

Policy rampConfigPolicy = new Policy();
rampConfigPolicy.addAssertion(config);

   
service._getServiceClient().getAxisService().getPolicyInclude().addPolicyElement(PolicyInclude.SERVICE_POLICY,
rampConfigPolicy);  
//service._getServiceClient().getServiceContext().getConfigurationContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY,rampConfigPolicy);

the last entry in the axis log when using addPolicyElement is:
2008-03-30,12:42:43,687 DEBUG: org.apache.rampart.MessageBuilder.build
Building SymmetricBinding
2008-03-30,12:42:43,703 DEBUG:
org.apache.rampart.builder.SymmetricBindingBuilder.build
SymmetricBindingBuilder build invoked
2008-03-30,12:42:43,703 DEBUG:
org.apache.rampart.builder.BindingBuilder.addTimestamp Adding timestamp

When using getConfigurationContext.setProperty the last log entry is:
2008-03-30,12:28:24,656 DEBUG:
org.apache.rampart.builder.AsymmetricBindingBuilder.build
AsymmetricBindingBuilder build invoked

Is there something wrong with the way i am configuring rampart?

Michael

-- 
View this message in context: 
http://www.nabble.com/Rampart-Secureconv-%3E-JaxenException-tp16380606p16380606.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] 1.4 RC3

2008-03-30 Thread Davanum Srinivas

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

I've posted the RC3 here:
http://people.apache.org/~dims/axis2-1.4/RC3/

Notes:
- - There's a text file with revision numbers that i used for all the SNAPSHOTS
- - There's a m2-repo.zip with all the m2 artifacts
- - There's an online repo as well
~  http://people.apache.org/~dims/axis2-1.4/RC3/m2-repo/

Please kick the tires and raise JIRA's.

Thanks,
dims

PS: I haven't cut the 1.4 branch as there's a significant patch from Sanka that 
needs to be merged again and tested
thoroughly.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)

iD8DBQFH729IgNg6eWEDv1kRAo8JAKCJ2YcxQNNELaTMxk67oQLu/rUQfACgwxH+
NIpk5zeJ9ayU/TAGInv/QZc=
=tYV5
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2 with rampart sample, username hardcoded

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Jason,
   You need to have that Username Token assertion inside a
supporting token assertion.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>


  

 

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





But here the password is in clear text. If you are using Rampart
SNAPSHOT , you can use WS Security Policy 1.2 to send the hashed
password. The policy for that is given below.

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";

xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>


  

  
  
  
  
  

  
  http://ws.apache.org/rampart/policy";>
Alice

org.apache.testing.clients.WSS11Client





thanks,
/nandana

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using rampart policy for basic authentication

2008-03-30 Thread Nandana Mihindukulasooriya
Hi Jason,

>  Is it possible to implement the rampart sample/basic/sample02 with
>  policy?

Even though this is not recommended ( sending the UT in plain text
over HTTP), this is possible with Rampart. Policy for your scenario is

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>


  

 

  
  http://ws.apache.org/rampart/policy";>
username 

PWCallback





>  If it is possible, how can I find out in my business method who the
>  authenticated user is?  For example, the Servlet API has a method
>  HttpServletRequest.getRemoteUser(). Is such a similar API in rampart?

This tutorial describes how you can do this [1].

thanks,
/nandana

[1] -   http://wso2.org/library/169

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]