This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

axis 1.4/ wws4j signing and .net problem

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've been told I need to send requests to a .net service. They have supplied me with this policy document:




Google tells me I can do this on my out-going messages to get them to use http://schemas.xmlsoap.org/ws/2004/03/addressing




These constants are in the addressing.1.0.jar. The problem I have is that I cannot find this jar for download *anywhere*. not from the Apache website, certainly.




 
John Farrel
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Problem solved:

I found an archived copy of wss4j (1.5.0) which includes addressing.1.0.jar. More recent builds do not include this library.

Just before calling the web service, set




I needed to sign these elements of the message:

wsp:Body()
wsp:Header(wsa:Action)
wsp:Header(wsa:FaultTo)
wsp:Header(wsa:From)
wsp:Header(wsa:MessageID)
wsp:Header(wsa:RelatesTo)
wsp:Header(wsa:ReplyTo)
wsp:Header(wsa:To)
wse:Timestamp()

so the wsdd needed to change to this:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"; xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">;
<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<parameter name="addressing.sendReplyTo" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<requestFlow >

<handler type="java:org.apache.axis.message.addressing.handler.AddressingHandler">
<parameter name="referencePropertyNames" value="{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}Action;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}MessageID;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}From"/>
</handler>

<handler type="java:org.apache.ws.axis.security.WSDoAllSender">
<parameter name="action" value="Timestamp Signature"/>
<parameter name="action" value="Timestamp Signature"/>
<parameter name="user" value="username"/>
<parameter name="passwordCallbackClass" value="classname"/>
<parameter name="passwordType" value="PasswordText"/>
<parameter name="signaturePropFile" value="Crypto.properties"/>
<parameter name="signatureKeyIdentifier" value="DirectReference"/>
<parameter name="signatureParts" value="{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}Action;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}MessageID;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/03/addressing}From;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
</handler>
</requestFlow >
</globalConfiguration >
</deployment>



 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

We are also facing the same Issue.Can you please assist us to resolve the issue.

Regards,
Sarath VK
 
Do you pee on your compost? Does this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic