WCF client consumes JAVA web service - should I use WCF or just create a custom parser/message factory?

We've a business partner who requires us to create a service request message with a SAML 2.0 assertion. The partner's supplied two certificates and a test harness for their JAVA webservice.
I've created a WCF client with a `CustomBinding` to try and recreate the request and consume the service, but I'm getting so frustrated with the nuances of WCF (and the lack of intrinsic support for SAML 2.0) I'm wondering am I better off using something like
a `WebClient` or `HttpWebRequest` and encrypting/building & signing the XML web request and doing the same for the response. I know there's a lot of work involved on this but at least I'd be in full control.
Your advice would be very much appreciated, what I'm working with is displayed below
**Note: I was supplied with a SoapUI Test harness for the Java service**
**The vendor supplied me with this request (ran though SOAPUI and extracted via Fiddler)**
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<xenc:EncryptedKey Id="EncKeyId-29B98C291D1FDFB39113352984774895">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference>
<ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=test_server</ds:X509IssuerName>
<ds:X509SerialNumber>12356789</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>
<!--Omitted -->
</xenc:CipherValue>
</xenc:CipherData>
<xenc:ReferenceList>
<xenc:DataReference URI="#EncDataId-3"/>
</xenc:ReferenceList>
</xenc:EncryptedKey>
<wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-29B98C291D1FDFB39113352984773591" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><!-- Omitted --> </wsse:BinarySecurityToken>
<ds:Signature Id="Signature-1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-2">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>
<!--Omitted -->
</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
<!--Omitted -->
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-29B98C291D1FDFB39113352984773792">
<wsse:SecurityTokenReference wsu:Id="STRId-29B98C291D1FDFB39113352984773893" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Reference URI="#CertId-29B98C291D1FDFB39113352984773591" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
<saml:Assertion ID="_54d0c8395de26c3e44730df2c9e8d3e9" IssueInstant="2012-02-17T10:40:36.806Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<saml:Issuer>CN=test_client</saml:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#_54d0c8395de26c3e44730df2c9e8d3e9">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted -->
</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
<!--Omitted -->
</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
<!--Omitted -->
</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
<saml:Subject>
<saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">[email protected]</saml:NameID>
</saml:Subject>
<saml:Conditions NotBefore="2012-02-17T10:40:21.806Z" NotOnOrAfter="2012-02-17T10:41:06.806Z"/>
</saml:Assertion>
<wsa:Action SOAP-ENV:mustUnderstand="1">http://www.xxxxxxx.xxx/ws/schemas/xxxxxx1/xxxx/xxxxxxxxxxxxxx</wsa:Action>
<wsa:MessageID SOAP-ENV:mustUnderstand="1">uuid:bffc27ba-68d9-44e6-b1f0-e2f852df7715</wsa:MessageID>
</SOAP-ENV:Header>
<SOAP-ENV:Body wsu:Id="id-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<xenc:EncryptedData Id="EncDataId-3" Type="http://www.w3.org/2001/04/xmlenc#Content">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:Reference URI="#EncKeyId-29B98C291D1FDFB39113352984774895"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>
<!--Omitted -->
</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
**This is as close as I've gotten with my WCF client. Issues I can immediatley is that the `<o:SecurityTokenReference>` element should contain the Issuer and Serial, instead it contains a `KeyIdentifier` element?**
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1" u:Id="_3"/>
<a:MessageID u:Id="_4">urn:uuid:fc8ef84b-dbf5-4150-a0c3-d4cc986333d1</a:MessageID>
<ActivityId CorrelationId="a9e1fec4-32bc-4633-909e-3d601c809b3c" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">d1909115-8922-46f3-a96c-db15bf91c599</ActivityId>
<a:ReplyTo u:Id="_5">
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo27oY4/3mnBOry0YL4StqvcAAAAA0UM+eVt4fU2AOe9/B3lPDZNf/2HmAuNEvzAoW0eKVSUACQAA</VsDebuggerCausalityData>
<a:To s:mustUnderstand="1" u:Id="_6">https://localhost:8089/ws</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="uuid-e5592f06-32af-40fb-996e-a0a469c7ed5e-2">
<u:Created>2012-04-24T20:41:50.447Z</u:Created>
<u:Expires>2012-04-24T20:46:50.447Z</u:Expires>
</u:Timestamp>
<e:EncryptedKey Id="uuid-e5592f06-32af-40fb-996e-a0a469c7ed5e-1" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<o:SecurityTokenReference>
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">lU10DQn4lSpE4fRpE9gslm5QDt0=</o:KeyIdentifier>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>
<!--Omitted-->
</e:CipherValue>
</e:CipherData>
<e:ReferenceList>
<e:DataReference URI="#_2"/>
<e:DataReference URI="#_7"/>
<e:DataReference URI="#_8"/>
</e:ReferenceList>
</e:EncryptedKey>
<o:BinarySecurityToken u:Id="uuid-fad0c01f-ab4b-4a5f-bec6-93aa8c2d5a52-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"><!--Omitted--></o:BinarySecurityToken>
<e:EncryptedData Id="_7" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<e:CipherData>
<e:CipherValue>
<!--Omitted-->
</e:CipherValue>
</e:CipherData>
</e:EncryptedData>
<e:EncryptedData Id="_8" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<e:CipherData>
<e:CipherValue><!--Omitted--></e:CipherValue>
</e:CipherData>
</e:EncryptedData>
</o:Security>
</s:Header>
<s:Body u:Id="_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<e:CipherData>
<e:CipherValue><!--Omitted--></e:CipherValue>
</e:CipherData>
</e:EncryptedData>
</s:Body>
</s:Envelope>
Using this configuration for the WCF CustomBinding
<system.serviceModel>
<bindings>
<customBinding>
<binding name="WSHttpBinding_IEnquiryRequest" >
<transactionFlow />
<security defaultAlgorithmSuite="TripleDesRsa15"
authenticationMode="MutualCertificate"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireDerivedKeys="false"
>
<secureConversationBootstrap authenticationMode="CertificateOverTransport"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireDerivedKeys="false" />
</security>
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<!--<mtomMessageEncoding messageVersion="Soap11WSAddressing10" />-->
<httpsTransport requireClientCertificate="true" />
</binding>
</customBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="certBehaviour">
<clientCredentials>
<!-- clientCertificate not defaultCertificate -->
<clientCertificate x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" findValue="test_client" />
<serviceCertificate>
<defaultCertificate x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" findValue="test_server"/>
<authentication revocationMode="NoCheck" certificateValidationMode="None" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint
address="https://localhost:8089/pvs/ws"
binding="customBinding"
bindingConfiguration="WSHttpBinding_IEnquiryRequest"
contract="XXXService.enquiryRequest"
name="WSHttpBinding_IEnquiryRequest"
behaviorConfiguration="certBehaviour"
>
<identity>
<dns value="test_server"/>
</identity>
</endpoint>
</client>
</system.serviceModel>
I've no idea how to insert the SAML 2.0 assertion in there before it's signed. That and the Key Issuer/serial issue above is where my main problems lie with the request.
Any and all help appreciated
                    

Yaron,
Thanks a million for your response, think you hit the nail on the head there. Actually figured out the first part myself this morning, I've retrieved the SymmetricSecurityBindingElement object from the binding configured in the app.config and set it explicitly,
just as you've defined. Couldnt figure out how to do this yesterday for some reason! Here's the code for anyone that's interested:
//Get custom binding reference from app.config
CustomBinding binding = new CustomBinding("bindingNameInConfig");
// Reference the symmetric security element
SymmetricSecurityBindingElement securityBindingElement = binding.Elements.Find<SymmetricSecurityBindingElement>();
// Get the x509ProtectionParams from the security element
X509SecurityTokenParameters tokenParameters = new X509SecurityTokenParameters();
tokenParameters.X509ReferenceStyle = X509KeyIdentifierClauseType.IssuerSerial;
tokenParameters.RequireDerivedKeys = false;
tokenParameters.InclusionMode = SecurityTokenInclusionMode.AlwaysToInitiator;
// Set the X509SecurityTokenParameters to point to the one's just configured. This is for symetric encryption, for asymetric this line needs to change
securityBindingElement.ProtectionTokenParameters = tokenParameters;
Are you sure that SAML assertion is not signed? That makes things a lot easier! Do you think the following approach will work when inserting in the SAML 2.0 assertion? :
Create a class that inherits from IClientMessageInspector and insert the SAML as shown below
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.Text;
using System.Xml;
using Microsoft.IdentityModel.Protocols.XmlSignature;
namespace TestClient.Application
class Saml20Extension : IClientMessageInspector, IEndpointBehavior
#region Implementation of IClientMessageInspector
public object BeforeSendRequest(ref Message request, IClientChannel channel)
MessageBuffer buffer = request.CreateBufferedCopy(int.MaxValue);
// ** Add the SAML Assertion XML here **
request = buffer.CreateMessage();
return null;
public void AfterReceiveReply(ref Message reply, object correlationState)
MessageBuffer buffer = reply.CreateBufferedCopy(Int32.MaxValue);
// ** REMOVE THE SAML ASSERTION HERE **
reply = buffer.CreateMessage();
#endregion
#region Implementation of IEndpointBehavior
public void AddBindingParameters(ServiceEndpoint endpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
// Add this implementation to the inspectors.
clientRuntime.MessageInspectors.Add(this);
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
public void Validate(ServiceEndpoint endpoint)
#endregion
Also, There's a second signature being inserted into my WCF request that I need to replace with the SAML insertion - how do i get rid of the second signature?? (see updated request below)
POST https://localhost:8089/pvs/ws HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Host: localhost:8089
Content-Length: 6720
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1" u:Id="_3"/>
<a:MessageID u:Id="_4">urn:uuid:84dc0bb8-13fd-4e90-84c4-ed1e6e831801</a:MessageID>
<ActivityId CorrelationId="07e0df62-d40a-4e24-aacc-12e626f80e8b" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">40077c44-d415-4567-99a1-1ea610c41d94</ActivityId>
<a:ReplyTo u:Id="_5">
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo1f0ZJ98FOxIvULl0pmGv/wAAAAAEGu5/G7VNkia/XbStJDa+ldqi+8xxdtAiBL+Y8vCqa0ACQAA</VsDebuggerCausalityData>
<a:To s:mustUnderstand="1" u:Id="_6">https://localhost:8089/pvs/ws</a:To>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<e:EncryptedKey Id="uuid-5b1de37e-ea76-4f75-b268-ebb63b554c11-1" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<o:SecurityTokenReference>
<X509Data>
<X509IssuerSerial>
<X509IssuerName>CN=test_server</X509IssuerName>
<X509SerialNumber>123456789</X509SerialNumber>
</X509IssuerSerial>
</X509Data>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue><!--Omitted--></e:CipherValue>
</e:CipherData>
<e:ReferenceList>
<e:DataReference URI="#_2"/>
</e:ReferenceList>
</e:EncryptedKey>
<o:BinarySecurityToken u:Id="uuid-d62ff21f-7e9b-460d-a0ee-d5fad221427d-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MIIBpzCCARCgAwIBAgIETzKMfzANBgkqhkiG9w0BAQUFADAYMRYwFAYDVQQDDA10ZXN0X2ZhY2lsaXR5MB4XDTEyMDIwODE0NTM1MVoXDTE3MDIwODE0NTM1MVowGDEWMBQGA1UEAwwNdGVzdF9mYWNpbGl0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvzdwlxcpwRKGzLvpqYoS4NEbhbx/jV6Z6kyXgJ0IWLZAW20oWmxPwumsqkKr6bWX2NWbGrka6w1e9+iZFBKiBq5zzxJKusCJQtPjuYwjaTGjVTFnixHp9sKnjIEprKyarceG00WzCVdtuI1NpNp8dgemzA6FFt1ESwwELq+rKvECAwEAATANBgkqhkiG9w0BAQUFAAOBgQAokX6HZhhEj7Bfo0Z8ZeoZeYFB8pHrN5A6927cJx17EXWVv0Mwn/+fDgTAhtsN9DB68CFNejox8mM0+KewjsgT4z80YxMHGlpM13z4c8+iMiQcJ7cISScTBaTONOtDqK1WNtci8biNjnLn7+4Z4fw17jlttN0dPHC3fvGywh6TkQ==</o:BinarySecurityToken>
<Signature Id="_0" xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
<Reference URI="#_1">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
<Reference URI="#_3">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
<Reference URI="#_4">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
<Reference URI="#_5">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
<Reference URI="#_6">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
<!--Omitted-->
</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
<o:Reference ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" URI="#uuid-5b1de37e-ea76-4f75-b268-ebb63b554c11-1"/>
</o:SecurityTokenReference>
</KeyInfo>
</Signature><!-- Why is this second signature here? how do i get rid of it and replace with SAML --> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>
<!--Omitted-->
</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
<!--Omitted-->
</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-d62ff21f-7e9b-460d-a0ee-d5fad221427d-1"/>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
<s:Body u:Id="_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<e:CipherData>
<e:CipherValue>
<!--Omitted-->
</e:CipherValue>
</e:CipherData>
</e:EncryptedData>
</s:Body>
</s:Envelope>

Similar Messages

  • Handling of SOAP Faults in SOAP Clients consuming PI Web services

    Hi there,
    the following is in regards to SOAP fault error handling in a SOAP client that consumes a Web Service published by PI.
    I have been reading a number of threads and blogs in regards to this topic and I am still left with some open questions which I hope to get some final answersclarifications through this thread.
    In particular the blogs
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI      - Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
    XI: Propagation of meaningful error information to SOAP Client     - XI: Propagation of meaningful error information to SOAP Client
    have caused by attention.
    Both of these threads are realating to the Fault Message type one can use to return errors back to a SOAP Client (.Net, Java, etc.).
    In our scenario we published a number of Web Services through PI that provide functionality to integrate with an R3 back-end system using inbound ABAP Proxies.
    The services are standardised and will be consumed by a number of .NetJava applications and systems. The reason for the use of ABAP proxies is the customer specific application logic that is executed in the backend system. The Web services are synchronous and don't use ccBPM in the middle. Transformations are performed in PI combined with various lookups to set default values before the message is passed into the ABAP Framework of the R3 back-end system. The lookups are done against the R3 back-end system using the PI RFC Lookup feature.
    The inbound proxies currently return application errors as part of the response message back to the SOAP client. For more critical errors we introduced the use of Fault message types as the method to return the information back to the SOAP Client. This is all working satisfactory.
    The questions I have are as follows.
    1. When an error occurs at the IE level (e.g. mapping error), ABAP Proxy framework level (e.g. conversion from XML to ABAP format) or Adapter Framework level (Adapter releated error) a different SOAP fault message structure is returned to the SOAP Client than the one    used for the application errors. The SOAP fault message structure used in this case is the standard SOAP fault used by PI to return system errors back to the caller. For those SOAP fault messages there is no payload generated that could be mapped to the SOAP fault structure used for the application errors. This would be preferrable as there would be only one Fault message structure used for both inbound ABAP proxy generated fault messages and PI generated fault messages.
    Also the error messages generated by PI can be quite cryptic and difficult to interpret at the client end and could be filtered     ranslated during message mapping if the payload of the PI generated SOAP fault message could be accessed in a message mapping.
    Point 3 of the above thread 2759 indicates that this would be possible but doesn't outline how. Could somebody please clarify this for me as I don't believe that this is really possible ???.
    My idea instead was to use the PI SOAP fault message structure to also return application errors. Therefore I would create a Fault message type that matches the PI SOAP fault structure. This would enable the SOAP Client to handle only one SOAP Fault error structure. Would that be something to look into instead ?????.
    2. We have been looking at using the integrated WEB AS SOAP adapter instead of using the AF Sender SOAP adapter. While playing with this we encountered differences in the content returned through the SOAP fault generated by PI. A sample is below. Shouldn't the content of these SOAP faults be the same if the error that caused it is the same. Also the SOAP fault returned by the IE SOAP adapter is much more    useful in this particular case. Both errors below are the same, a conversion error from XML to ABAP took place in the inbound ABAP proxy framework of the back-end system.
    SOAP fault returned when using SOAP Sender adapter of AF
    <!see the documentation>
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>ADAPTER.JAVA_EXCEPTION</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
         at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    SOAP fault using integrated SOAP adapter of PI IE
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>System Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context/>
                   <code>ABAP.PARSE_APPLICATION_DATA</code>
                   <text>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXSBE20FF604BAFEF8D990A XML Bytepos.: 564  XML Path: ns1:CreatePORequest(1)POHEADER(2)COMP_CODE(1) Error Text: Data loss occurred when converting ############################## Kernel ErrorId: CONVT_DATA_LOSS))</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    I have been reading threads for hours without being able to find one that answers questions 1 or provides a blog that outlines the approach one should take for error handling in SOAP clients that consume PI Web Services (and covers both PISystem generated faults and faults raised in Proxies).
    There may already be a blog or thread and I just missed it.
    Any comments are welcome.
    Thanks. Dieter

    Hi Dieter,
    As Bhavesh already mentioned fault messages are used for application errors. The same is described in SAP XI help:
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    In case of system error (e.g. field length too long in proxy call or error in XI/PI mapping) there seems to be no standard way of handling it and propagating the response to the consumer of webservice.
    Each system error is not recognized by SOAP adapter and SOAP adapter exception is raised.
    The only bizzare solution that I can see is developing an adapter module and transport wrong message to standard fault message before delivering it to adapter engine:
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    Kind regards,
    Wojciech
    btw nice thread

  • Consuming Java Web Service with complex return types

    Hi,
    I'm consuming a Java Web Service and the return I get in
    ColdFusion is a typed Java Object (with custom Java classes like
    com.company.project.JavaClass ...)
    Within this object I don't get direct accessible properties
    as when I'm consuming ColdFusion Web Services, instead I get a
    getPROPERTYNAME and setPROPERTYNAME method for each property.
    How can I handle this? I don't want to call this methods for
    each property (and there are nested objects with arrays of custom
    classes below, which would really make this complicated).
    What's the best way to cope up with this?
    Thanks a lot,
    Fritz

    The web service is actually the function, not the cfc and you
    didn't show a function.
    My own opinion is that since webservices by definition should
    be available to any calling app (cold fusion, .net, flash, etc),
    whatever gets returned from the method should be as universally
    recognizable as possible. This generally means text, numbers,
    boolean, or xml.

  • How consume java web services

    Hello,
    I want to use java webservices.
    I read WSDL file but i don't know how to implement and to use method of this service.
    Can you help me ?
    Thanks
    Moderator Message: Frequently Asked Question. Please search for available information before posting.
    Edited by: kishan P on Dec 6, 2010 2:20 PM

    From your post it is not clear what kind of Java web service client (JAX-WS, JAX-RPC, Axis) you are using. The problem being faced is also not clear in the post. Some more elaboration may help others in providing inputs.

  • Which is the BEST Java Web Service Framework to use?

    Hi all,
    I'm a beginner to Web Services.
    I am planning to implement java web services to make the communication between java(Tomcat Server) and C# client.
    I found list of web service frameworks like,
    1. Apache Axis,(POJO,Axiom)
    2. JSON-RPC,
    3. Java Web Services Development Pack ,
    4. Web Services Invocation Framework,
    5. Xfire,
    6. XML Interface for Network Services. ...
    Please do reply me that which web service framework will be efficient to use.

    But, I want to know which Framework will provide
    better performance?
    better than what?
    Also I want to develope the web service as a standard
    one andeach has it's own quircks and implementation details. Each should be able to generate and accept the same SOAP messages though if you implement them properly.
    It should be able to provide bulk data exchange.
    That will depend in large part on your hardware.
    Please suggest a web service framework
    (Java-based) which will give better performance.again, better than what?
    Better than messenger pidgeons?
    Better than swallows (European or African)?
    And if so, how heavy would the message capsule be? 2 swallows may be able to carry a coconut together, holding it on a piece of string.

  • Problems while consuming a web-service through Netweaver using VPN

    Hi all
    I'm facing a problem while I'm attempting to consume a .NET web-service that is located in a remote server. We've estabished a VPN connection between our Netweaver CE in Linux to the remote office where the web-service is running.
    The problem is, when my application running in Netweaver tries to consume the webservice, it takes the external access to try to reach the webservice URL instead of take the VPN route to do that. ie. my application find an external IP of the webservice instead of finding the internal IP.
    When I ping the webservice URL in linux, it brings me the internal IP, but for some unknown reason, the Netweaver don't find the correct route to reach the webservice.
    Does anyone have any idea or suggestion on what to do?
    Thanks in advance!

    > The problem is, when my application running in Netweaver tries to consume the webservice, it takes the external access to try to reach the webservice URL instead of take the VPN route to do that. ie. my application find an external IP of the webservice instead of finding the internal IP.
    You're using a proxy?
    Markus

  • ABAP code and konfiguration for consuming secure web services

    I need some help/links on how to create an abap program (on 4.6 or WAS 620, or 640 if not possible in older releases) to consume a web service with authentication using certificates based on WS security  (<a href="http://www.oasis-open.org/committees/wss">http://www.oasis-open.org/committees/wss</a>) or client certificates. The request must include attachment in DIME or base64 format (preferably DIME).
    On 4.6 I have used the FM HTTP_POST with the if_ixml interface to consume web services, but I don't know if it can handle https authentication and attachements.
    Message was edited by: Robert

    check out this weblog.
    <a href="/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https">Calling WebServices from ABAP via HTTPS</a>
    Regards
    Raja

  • Consuming a Web service from Crystal reports 2008 - Error

    Hi,
    I want to consume a web service from Crystal Reports 2008. I created a New Connection using "XML and Web Services" and given WSDL url as the Web Service location. Crystal Report is able to connect to the WSDL and is displaying the tags correctly. When dragging the output to "Selected Tables' section, I am getting the following error:
    "Invalid Argument Provided"
    Details: Cannot support ArrayType input parameters.
    Kindly help. Apparently this was a limitation in CR XI but does it still exist in CR 2008? Is there any patch available to resolve this issue?
    Thanks,
    Jaya
    Edited by: jayakvr on Feb 17, 2011 10:47 AM
    Edited by: jayakvr on Feb 17, 2011 10:48 AM
    Edited by: jayakvr on Feb 17, 2011 10:48 AM

    This issue is resolved now. I have installed the Service packs 1, 2 and 3 of CR2008 to overcome this error.
    Thanks,
    Jaya

  • Issue Consuming a Java Web Service

    I've been doing research and on how to consume a Web Service from PL/SQL. The following is a chunk of the code. I can call the Web Service from other clients but not from my PL/SQL client. I keep getting this error
    ORA-29532: Java call terminated by uncaught Java exception: service: {http://10.93.38.134:7001/nmrwws/RewardsValidationService}RewardsValidationService does not contain port: {http://10.93.38.134:7001/nmrwws/RewardsValidationService}RewardsValidationPort
    What am I missing and can someone lead more to better info on using UTL_DBWS.
    CREATE OR REPLACE PACKAGE BODY nmrw_http_post_pkg
    AS
    PROCEDURE get_batch( x_errbuf OUT varchar2
    , x_retcode OUT varchar2
    , p_batch_id IN number
    IS
    l_service sys.UTL_DBWS.service;
    l_call sys.UTL_DBWS.call;
    l_result anydata;
    l_wsdl_url varchar2( 32767 );
    l_namespace varchar2( 32767 );
    l_service_qname sys.UTL_DBWS.qname;
    l_port_qname sys.UTL_DBWS.qname;
    l_operation_qname sys.UTL_DBWS.qname;
    l_input_params sys.UTL_DBWS.anydata_list;
    BEGIN
    l_wsdl_url := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService?WSDL';
    l_namespace := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService';
    l_service_qname := sys.UTL_DBWS.to_qname( l_namespace
    , 'RewardsValidationService'
    l_port_qname := sys.UTL_DBWS.to_qname( l_namespace
    , 'RewardsValidationPort'
    l_operation_qname := sys.UTL_DBWS.to_qname( l_namespace
    , 'getAuthorizations'
    l_service := sys.UTL_DBWS.create_service( wsdl_document_location => urifactory.geturi( l_wsdl_url )
    , service_name => l_service_qname
    l_call := sys.UTL_DBWS.create_call( service_handle => l_service
    , port_name => l_port_qname
    , operation_name => l_operation_qname
    l_input_params( 0 ) := anydata.convertvarchar2( 'NMCLL' );
    l_result := sys.UTL_DBWS.invoke( call_handle => l_call
    , input_params => l_input_params
    sys.UTL_DBWS.release_call( call_handle => l_call );
    sys.UTL_DBWS.release_service( service_handle => l_service );
    Here is the WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
    -->
    - <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).
    -->
    - <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.nmrw.neimanmarcus.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.nmrw.neimanmarcus.com/" name="RewardsValidationService">
    - <types>
    - <xsd:schema>
    <xsd:import namespace="http://ws.nmrw.neimanmarcus.com/" schemaLocation="http://10.93.38.134:7001/nmrwws/RewardsValidationService?xsd=1" />
    </xsd:schema>
    </types>
    - <message name="getAuthenticated">
    <part name="parameters" element="tns:getAuthenticated" />
    </message>
    - <message name="getAuthenticatedResponse">
    <part name="parameters" element="tns:getAuthenticatedResponse" />
    </message>
    - <message name="getAuthorizations">
    <part name="parameters" element="tns:getAuthorizations" />
    </message>
    - <message name="getAuthorizationsResponse">
    <part name="parameters" element="tns:getAuthorizationsResponse" />
    </message>
    - <message name="isValidAuthorization">
    <part name="parameters" element="tns:isValidAuthorization" />
    </message>
    - <message name="isValidAuthorizationResponse">
    <part name="parameters" element="tns:isValidAuthorizationResponse" />
    </message>
    - <message name="getValidJobNames">
    <part name="parameters" element="tns:getValidJobNames" />
    </message>
    - <message name="getValidJobNamesResponse">
    <part name="parameters" element="tns:getValidJobNamesResponse" />
    </message>
    - <message name="isValidJobName">
    <part name="parameters" element="tns:isValidJobName" />
    </message>
    - <message name="isValidJobNameResponse">
    <part name="parameters" element="tns:isValidJobNameResponse" />
    </message>
    - <message name="isValidFacilityNum">
    <part name="parameters" element="tns:isValidFacilityNum" />
    </message>
    - <message name="isValidFacilityNumResponse">
    <part name="parameters" element="tns:isValidFacilityNumResponse" />
    </message>
    - <message name="isValidFacilityCode">
    <part name="parameters" element="tns:isValidFacilityCode" />
    </message>
    - <message name="isValidFacilityCodeResponse">
    <part name="parameters" element="tns:isValidFacilityCodeResponse" />
    </message>
    - <message name="getValidFacilityCodes">
    <part name="parameters" element="tns:getValidFacilityCodes" />
    </message>
    - <message name="getValidFacilityCodesResponse">
    <part name="parameters" element="tns:getValidFacilityCodesResponse" />
    </message>
    - <message name="isValidDunsNumber">
    <part name="parameters" element="tns:isValidDunsNumber" />
    </message>
    - <message name="isValidDunsNumberResponse">
    <part name="parameters" element="tns:isValidDunsNumberResponse" />
    </message>
    - <message name="isValidGlAccount">
    <part name="parameters" element="tns:isValidGlAccount" />
    </message>
    - <message name="isValidGlAccountResponse">
    <part name="parameters" element="tns:isValidGlAccountResponse" />
    </message>
    - <message name="isValidVendorNumber">
    <part name="parameters" element="tns:isValidVendorNumber" />
    </message>
    - <message name="isValidVendorNumberResponse">
    <part name="parameters" element="tns:isValidVendorNumberResponse" />
    </message>
    - <message name="isValidDivisionNumber">
    <part name="parameters" element="tns:isValidDivisionNumber" />
    </message>
    - <message name="isValidDivisionNumberResponse">
    <part name="parameters" element="tns:isValidDivisionNumberResponse" />
    </message>
    - <message name="isValidMerchDivision">
    <part name="parameters" element="tns:isValidMerchDivision" />
    </message>
    - <message name="isValidMerchDivisionResponse">
    <part name="parameters" element="tns:isValidMerchDivisionResponse" />
    </message>
    - <message name="getValidMerchDivision">
    <part name="parameters" element="tns:getValidMerchDivision" />
    </message>
    - <message name="getValidMerchDivisionResponse">
    <part name="parameters" element="tns:getValidMerchDivisionResponse" />
    </message>
    - <message name="isValidMerchDeptClass">
    <part name="parameters" element="tns:isValidMerchDeptClass" />
    </message>
    - <message name="isValidMerchDeptClassResponse">
    <part name="parameters" element="tns:isValidMerchDeptClassResponse" />
    </message>
    - <message name="getValidMerchDeptClass">
    <part name="parameters" element="tns:getValidMerchDeptClass" />
    </message>
    - <message name="getValidMerchDeptClassResponse">
    <part name="parameters" element="tns:getValidMerchDeptClassResponse" />
    </message>
    - <message name="isValidMerchDeptClassVendor">
    <part name="parameters" element="tns:isValidMerchDeptClassVendor" />
    </message>
    - <message name="isValidMerchDeptClassVendorResponse">
    <part name="parameters" element="tns:isValidMerchDeptClassVendorResponse" />
    </message>
    - <message name="getValidMerchDeptClassVendor">
    <part name="parameters" element="tns:getValidMerchDeptClassVendor" />
    </message>
    - <message name="getValidMerchDeptClassVendorResponse">
    <part name="parameters" element="tns:getValidMerchDeptClassVendorResponse" />
    </message>
    - <message name="isValidMerchDivisionDeptVendor">
    <part name="parameters" element="tns:isValidMerchDivisionDeptVendor" />
    </message>
    - <message name="isValidMerchDivisionDeptVendorResponse">
    <part name="parameters" element="tns:isValidMerchDivisionDeptVendorResponse" />
    </message>
    - <message name="getValidMerchDivisionDeptVendor">
    <part name="parameters" element="tns:getValidMerchDivisionDeptVendor" />
    </message>
    - <message name="getValidMerchDivisionDeptVendorResponse">
    <part name="parameters" element="tns:getValidMerchDivisionDeptVendorResponse" />
    </message>
    - <message name="isValidMerchDivisionDeptVendorStyle">
    <part name="parameters" element="tns:isValidMerchDivisionDeptVendorStyle" />
    </message>
    - <message name="isValidMerchDivisionDeptVendorStyleResponse">
    <part name="parameters" element="tns:isValidMerchDivisionDeptVendorStyleResponse" />
    </message>
    - <message name="getValidMerchDivisionDeptVendorStyle">
    <part name="parameters" element="tns:getValidMerchDivisionDeptVendorStyle" />
    </message>
    - <message name="getValidMerchDivisionDeptVendorStyleResponse">
    <part name="parameters" element="tns:getValidMerchDivisionDeptVendorStyleResponse" />
    </message>
    - <portType name="RewardsValidationDelegate">
    - <operation name="getAuthenticated">
    <input message="tns:getAuthenticated" />
    <output message="tns:getAuthenticatedResponse" />
    </operation>
    - <operation name="getAuthorizations">
    <input message="tns:getAuthorizations" />
    <output message="tns:getAuthorizationsResponse" />
    </operation>
    - <operation name="isValidAuthorization">
    <input message="tns:isValidAuthorization" />
    <output message="tns:isValidAuthorizationResponse" />
    </operation>
    - <operation name="getValidJobNames">
    <input message="tns:getValidJobNames" />
    <output message="tns:getValidJobNamesResponse" />
    </operation>
    - <operation name="isValidJobName">
    <input message="tns:isValidJobName" />
    <output message="tns:isValidJobNameResponse" />
    </operation>
    - <operation name="isValidFacilityNum">
    <input message="tns:isValidFacilityNum" />
    <output message="tns:isValidFacilityNumResponse" />
    </operation>
    - <operation name="isValidFacilityCode">
    <input message="tns:isValidFacilityCode" />
    <output message="tns:isValidFacilityCodeResponse" />
    </operation>
    - <operation name="getValidFacilityCodes">
    <input message="tns:getValidFacilityCodes" />
    <output message="tns:getValidFacilityCodesResponse" />
    </operation>
    - <operation name="isValidDunsNumber">
    <input message="tns:isValidDunsNumber" />
    <output message="tns:isValidDunsNumberResponse" />
    </operation>
    - <operation name="isValidGlAccount">
    <input message="tns:isValidGlAccount" />
    <output message="tns:isValidGlAccountResponse" />
    </operation>
    - <operation name="isValidVendorNumber">
    <input message="tns:isValidVendorNumber" />
    <output message="tns:isValidVendorNumberResponse" />
    </operation>
    - <operation name="isValidDivisionNumber">
    <input message="tns:isValidDivisionNumber" />
    <output message="tns:isValidDivisionNumberResponse" />
    </operation>
    - <operation name="isValidMerchDivision">
    <input message="tns:isValidMerchDivision" />
    <output message="tns:isValidMerchDivisionResponse" />
    </operation>
    - <operation name="getValidMerchDivision">
    <input message="tns:getValidMerchDivision" />
    <output message="tns:getValidMerchDivisionResponse" />
    </operation>
    - <operation name="isValidMerchDeptClass">
    <input message="tns:isValidMerchDeptClass" />
    <output message="tns:isValidMerchDeptClassResponse" />
    </operation>
    - <operation name="getValidMerchDeptClass">
    <input message="tns:getValidMerchDeptClass" />
    <output message="tns:getValidMerchDeptClassResponse" />
    </operation>
    - <operation name="isValidMerchDeptClassVendor">
    <input message="tns:isValidMerchDeptClassVendor" />
    <output message="tns:isValidMerchDeptClassVendorResponse" />
    </operation>
    - <operation name="getValidMerchDeptClassVendor">
    <input message="tns:getValidMerchDeptClassVendor" />
    <output message="tns:getValidMerchDeptClassVendorResponse" />
    </operation>
    - <operation name="isValidMerchDivisionDeptVendor">
    <input message="tns:isValidMerchDivisionDeptVendor" />
    <output message="tns:isValidMerchDivisionDeptVendorResponse" />
    </operation>
    - <operation name="getValidMerchDivisionDeptVendor">
    <input message="tns:getValidMerchDivisionDeptVendor" />
    <output message="tns:getValidMerchDivisionDeptVendorResponse" />
    </operation>
    - <operation name="isValidMerchDivisionDeptVendorStyle">
    <input message="tns:isValidMerchDivisionDeptVendorStyle" />
    <output message="tns:isValidMerchDivisionDeptVendorStyleResponse" />
    </operation>
    - <operation name="getValidMerchDivisionDeptVendorStyle">
    <input message="tns:getValidMerchDivisionDeptVendorStyle" />
    <output message="tns:getValidMerchDivisionDeptVendorStyleResponse" />
    </operation>
    </portType>
    - <binding name="RewardsValidationPortBinding" type="tns:RewardsValidationDelegate">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="getAuthenticated">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getAuthorizations">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidAuthorization">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidJobNames">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidJobName">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidFacilityNum">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidFacilityCode">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidFacilityCodes">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidDunsNumber">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidGlAccount">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidVendorNumber">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidDivisionNumber">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidMerchDivision">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidMerchDivision">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidMerchDeptClass">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidMerchDeptClass">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidMerchDeptClassVendor">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidMerchDeptClassVendor">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidMerchDivisionDeptVendor">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidMerchDivisionDeptVendor">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="isValidMerchDivisionDeptVendorStyle">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="getValidMerchDivisionDeptVendorStyle">
    <soap:operation soapAction="" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="RewardsValidationService">
    - <port name="RewardsValidationPort" binding="tns:RewardsValidationPortBinding">
    <soap:address location="http://10.93.38.134:7001/nmrwws/RewardsValidationService" />
    </port>
    </service>
    </definitions>

    I see this in the wsdl (all the way down).
    <port name="RewardsValidationPort" binding="tns:RewardsValidationPortBinding">Seems the port has its own namespace tns:? Which maps to: xmlns:tns="http://ws.nmrw.neimanmarcus.com/" (see at top of wsdl).
    You are using l_namespace in your to_qname call.
    l_port_qname := sys.UTL_DBWS.to_qname( l_namespace
    , 'RewardsValidationPort'
    );And l_namespace was set to:
    l_namespace := 'http://10.93.38.134:7001/nmrwws/RewardsValidationService';Maybe that is the issue?

  • Consuming External Web Services in Web Dynpro Java

    Hi All,
    I an trying to consume external web service in Web dynpro java using Adaptive Web Service Model.
    But getting below mentioned error while executing the web service
    Exception on execution of web service with WSDL URL 'D:\Web Service Project\CurrencyConvertor.asmx.xml' with operation 'ConversionRate' in interface 'CurrencyConvertorSoap'
    Steps i followed are as below:
    1. Created  Adaptive Web Service Model for this i select WSDL source as "Local File System or URL"
    In next step i select No logical destination radio button and click on next
    In next step, browse the WSDL file and successfully import the WSDL file.
    2. After successfully importing the WSDL file i wrote below code in Init method:
    WebModel modelweb = new WebModel();               
    Request_ConversionRate reqConversion = new Request_ConversionRate(modelweb);
    ConversionRate conversion= new ConversionRate(modelweb);
    reqConversion.setConversionRate(conversion);
    wdContext.nodeRequest_ConversionRate().bind(reqConversion);
    3.After that execute the model - code is given below :
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentRequest_ConversionRateElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeConversionRateResponse().invalidate();
        catch(Exception e)
          manager.reportException(e.getMessage(), false);
    Please let me know how to resolve this.
    Thanks
    Sandy

    Hi,
    You need to use destinations for metadata and modeldata.
    Configure those destination in Visula admin.
    you can refer to following link.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Regards,
    Shruti.

  • Java web service with php SOAP client

    Hi!
    I have a Java web service with a procedure, which connects to a database:
    public boolean connectDB(String driver,String host, String user, String password)
    try {
    Class.forName(driver);
    connection =
    DriverManager.getConnection
    host
    , user
    , password
    return true;
    } catch (Exception v_exception) {
    System.out.println("connectDB(): " + v_exception);
    return false;
    If I call it from a PHP client, it doesn't work but doesn't throw any exceptions on the server side.
    The way I call it:
    $client = new SoapClient
    (<path>);
    try
    $conn=$client->connectDB();
    catch (SoapFault $exception)
    echo "\nexception: " .$exception;
    On the client side, I have an exception, but it's not very detailed:
    exception: Object id #2
    I had a simple function, too, which returns a string:
    public String getTestString()
    return "test";
    and if I call it from PHP, it's working...
    What may be the problem?

    Neither the simple "setter" methods work.. :(
    The php client side:
    $string="aladar";
    $client->setSample($string);
    $return = $client->getSample();
    The server side:
    public String sample;
    public String getSample() {
    return sample;
    public void setSample(String a_sample) {
    sample = a_sample;
    Any ideas?

  • Java Web Service / ABAP Client proxy ... username & password

    I have some ABAP function modules that need to use some Java web services. For this, I have created a client proxy that is utilized by the ABAP function module and the client proxy in turn communicates with the Java web service.
    The web service does BASIC (USERNAME/PASSWORD) HTTP AUTHENTICATION. When I execute the ABAP function module in test mode, I am prompted with a username/password. How can I pass this username and password to the Java web service programmatically.

    Hi
    See this Help
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/14e13d8ee4535ee10000000a114084/frameset.htm
    Kind Regards
    Mukesh

  • JAX-RPC And Non-Java Web Service

    Hi,
    This is a total shot in the dark. I'm attempting to consume an RPC web service developed in Delphi. I've created a JAX-RPC client in NetBeans from the published WSDL, attached below. I've created calls to several of the procedures available. What's bizarre, at least to me, is that half of them work fine and half of them don't. In all cases where they don't I'm getting a returns SOAP envelope indicated an access violation, attached below. There are no errors in any of the server logs and the developer assures me that the procedures do, in fact, work from his client (also developed conveniently enough in Delphi).
    I'm willing to take him at face value for the moment and assume that the problem is in my client implementation, although I have no idea where it would lie. The only difference I've been able to gather between the features which work and those that don't is the size of the return package...it would most likely be much larger than the ones that don't work.
    The service is an ISAPI dll running under IIS on Windows Server 2003. Any clues or guidance anyone would be willing to provide would be most welcome. On to the files:
    There wasn't enough room to post the entire thing so I've included one working (CheckStock) and non-working (GetLibTrace) function.
    WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IInnovaServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      <message name="CheckStock2Request">
        <part name="OPC" type="xs:string"/>
      </message>
      <message name="CheckStock2Response">
        <part name="QTY" type="xs:int"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <message name="GetLibTrace5Request">
        <part name="LibName" type="xs:string"/>
      </message>
      <message name="GetLibTrace5Response">
        <part name="dimensions" type="xs:string"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <portType name="IInnovaService">
        <operation name="CheckStock">
          <input message="tns:CheckStock2Request"/>
          <output message="tns:CheckStock2Response"/>
        </operation>
        <operation name="GetLibTrace">
          <input message="tns:GetLibTrace5Request"/>
          <output message="tns:GetLibTrace5Response"/>
        </operation>
      </portType>
      <binding name="IInnovaServicebinding" type="tns:IInnovaService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CheckStock">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#CheckStock" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
        <operation name="GetLibTrace">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#GetLibTrace" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
      </binding>
      <service name="IInnovaServiceservice">
        <port name="IInnovaServicePort" binding="tns:IInnovaServicebinding">
          <soap:address location="http://172.20.10.145:8080/innovaservice.dll/soap/IInnovaService"/>
        </port>
      </service>
    </definitions>My client:
    package com.signet.innova.client;
    import com.signet.innova.client.interfaces.IInnovaService;
    import com.signet.innova.client.interfaces.IInnovaServiceservice_Impl;
    import java.net.URL;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Stub;
    import javax.xml.rpc.holders.Holder;
    import javax.xml.rpc.holders.IntHolder;
    import javax.xml.rpc.holders.StringHolder;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    public class InnovaClient {
        private void testConnection() {
            Stub stub = createProxy();
            IInnovaService service = (IInnovaService) stub;
            StringHolder sh1 = new StringHolder();
            StringHolder sh2 = new StringHolder();
            StringHolder sh3 = new StringHolder();
            IntHolder ih1 = new IntHolder();
            IntHolder ih2 = new IntHolder();
            IntHolder ih3 = new IntHolder();
            try {
                System.out.println("Calling checkStock()");
                service.checkStock("0103877866", ih1, sh1, ih2);
                System.out.println(" service returned => " + ih1.value + ":" + sh1.value + ":" + ih2.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
            try {
                System.out.println("Calling getLibTrace()");
                service.getLibTrace("REGULAR", sh1, sh2, ih3);
                System.out.println(" service returned => " + sh1.value + ":" + sh2.value + ":" + ih1.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
        private Stub createProxy() {
            return (Stub) (new IInnovaServiceservice_Impl().getIInnovaServicePort());
        public static void main(String[] args) {
            InnovaClient client = new InnovaClient();
            System.out.print("Running testConnection()...");
            client.testConnection();
    }The request and response packets are in my reply below. Ran out of characters. :o)
    Edited by: Pablo_Vadear on Dec 22, 2009 11:19 PM

    Correction from above...".it would most likely be much larger than the ones that don't work" should have been "it would most likely be much larger IN THE ONES THAT DON'T WORK". Sorry.
    The request:
    POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 484
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#CheckStock"
    User-Agent: Java/1.6.0_17
    Host: 172.20.10.145:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:CheckStock><OPC xsi:type="xsd:string">0103877866</OPC></ns0:CheckStock></env:Body></env:Envelope>POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 491
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#GetLibTrace"
    User-Agent: Java/1.6.0_17
    Host: localhost:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:GetLibTrace><LibName xsi:type="xsd:string">REGULAR</LibName></ns0:GetLibTrace></env:Body></env:Envelope>And the response:
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:CheckStockResponse xmlns:NS1="urn:InnovaServiceIntf-IInnovaService"><return xsi:type="xsd:int">0</return><QTY xsi:type="xsd:int">0</QTY><messages xsi:type="xsd:string">Item 0103877866 retrieved OK.
    Right side OPC.
    </messages></NS1:CheckStockResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    HTTP/1.1 200 OK
    Date: Tue, 22 Dec 2009 23:18:40 GMT
    Server: Microsoft-IIS/6.0
    Content-Type: text/xml
    Content-Length: 486
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</faultcode><faultstring>Access violation at address 00000000. Write of address 00000000</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>Any help appreciated.
    Edited by: Pablo_Vadear on Dec 22, 2009 11:23 PM

  • Seeking advice with concept / design of a Java Web Services Application

    Hi all,
    After a week of searching the internet I'm not sure how which projects, services, etc. I should use to develop my application. Please could someone offer some advice?
    Application outline (Java application running on Linux):
    1. Wait for an instruction from a Windows WCF application. Instruction contains a list of domain names and one or two other parameters.
    2. Perform queries upon those domain names (find if they are registered, etc. - takes 10-20 mins to do complete list)
    3. Send back results to WCF application.
    Solution 1 (first idea):
    1. Create SOAP web service using Java Web Services / Apache to listen for requests. Executes a Java Client Application upon request.
    2. Java Client Application performs the queries...
    3. Java Client Application sends results to the Windows web service.
    Solution 1 Problems:
    a) Using 2 applications, they won't be able to share the same memory.
    b) The whole process will be slow (having to pass the domain names from the service to application and execute the application each time) - A quick response is critical.
    c) Would like is for the whole process to be done under one application, sharing the same memory.
    Solution 2:
    1. Create a Java Daemon from scratch listening for an incoming SOAP message (no web service like Apache/Tomcat involved).
    2. Query the domain names in a new thread inside the Java Daemon
    3. Send the results back via SOAP.
    Solution 2 Problems:
    Cannot find examples of how to create a SOAP service from scratch. E.g. creating a WSDL file based on my application; converting application methods to SOAP-callable methods easily (without writing a framework).
    With all the Java tools and projects out there - Java EE, Glassfish Project - there must be a very easy way to achieve this seemingly simple task. Please can someone offer some advice?
    Many thanks for reading this.
    Richard
    Edited by: jazzinbrazil on Mar 30, 2009 4:58 AM

    You just need an app server like Tomcat.If I'm not wrong, Tomcat is a Servlet container.
    Servlets aren't deactivated when they don't receive
    any request for some time?
    How can I deploy an application to Tomcat in order to
    keep it always active?I don't know what you mean. Tomcat is an application that is always running. In what way are the Servlets deactivated?
    Apache Axis: http://ws.apache.org/axis/
    Yes I'm collecting some info about this... let's see
    it!
    Finally, to be more clearer... I don't want to start
    a new application at each invocation (something like
    getting the request, instantiating the necessary
    classes and executing them) but to call an already
    running app at each invocation (so, getting request
    and invoking, in a manner that I don't know, the
    running application).The container manages this. If you have data that must remain loaded, you can associate it with the class (use a static modifier.) This will complicate threading, however.
    I can use Axis to get the request, but it also grants
    me that my app will always be active?I think you are just using the wrong terminology here. What I think you are asking is whether the resources will be loded into memory at all times. If you want to ensure this behavior, you need to associate the data with a class. I'm not 100% positive, but I don't think Tomcat will unload classes in normal circumstances.

  • Stumbling...Consuming a Web Service

    I have written much code to publish and consume web services under MS .NET. Now I need to do the same in Java on an Oracle Portal platform. The help/docs were quite useful in getting me to create the code for the web service and the stub for accessing a web service. But now I'm suddenly lost. The stub for the web service client has a method with signature that takes Elements and returns a Vector. It appears that "Element" refers to an XML Element (probably created via DOM) and that "Vector" is a Vector of such Elements as returned in the response. I assume that there must be a way of creating these elements and of extracting the results from the ones returned in the Vector - something short of developing my own DOM parser. But the jDeveloper help is clueless on this topic. The index for help contains nothing on DOM, Document Object Model, Element, and so forth. When I go the forums, it appears that everyone already knows the secret but I'm standing in the cold. The popup tips know nothing about Element, even if I import org.w3c.dom. Where is the help/docs on this... or some sample code? I'm sure that the solution is quite simple -- probably a couple of lines of code. In summary, all I want to know is how to get between "String myWebCall(String)" and "Vector myWebCall(Element)" so that I can pass parameters and see the response. Am I stupid? (...is my wife right?)

    James, unfortunately the consumption of .NET document style Web services takes a little bit of work. The stub generator, as you note will generate a client but results in an XML element rather than a string. What this means is the magic sauce you refer to is called a bit of handcoding ... Read on for a sample.
    The good news is the summer release of Oracle9i JDeveloper the code will be automatically generated for .NET services. You won't have to parse any XML as below but get back the string arguments you are expecting. Sorry it is yet to come.
    However, in the meantime, to give you a hand on how to construct a client based on a working example find below some code from a class MainClient.java that consumes the Web service LocalTimeByZipCode off of XMethods.com - its WSDL is located at:
    http://www.alethea.net/webservices/LocalTime.asmx?WSDL
    Just go to http://www.alethea.net/webservices/LocalTime.asmx to see what the service is expecting versus readin the WSDL. If you have been working with .NET you will know this.
    Then point JDeveloper's stub/skeleton generator at this WSDL (or conversely your own service) and then create the client, MainClient.java with the following code (note the package I am using is mypackage1). In your JDeveloper libraries you should only have to include "Oracle SOAP", "Oracle XML Parser V2" and "Oracle9i JDeveloper Runtime" (as usual). Hopefully this code sample gives you how to tackle it now.
    package mypackage1;
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    import java.util.Vector;
    import java.util.Enumeration;
    public class MainClient
    public MainClient()
    XMLDocument doc = new XMLDocument();
    Element top = doc.createElementNS("http://alethea.net/webservices",
    "tns:LocalTimeByZipCode");
    Element zip = doc.createElementNS("http://alethea.net/webservices",
    "tns:ZipCode");
    Text text = doc.createTextNode("text#");
    // Set the zip code parameter
    text.setNodeValue("94116");
    zip.appendChild(text);
    top.appendChild(zip);
    LocalTimeStub lts = new LocalTimeStub();
    try
    System.out.println("Sending:");
    ((XMLElement)top).print(System.out);
    Vector response = lts.LocalTimeByZipCode(top);
    System.out.println("Received " + response.size() + " element");
    Enumeration enum = response.elements();
    while (enum.hasMoreElements())
    Object o = enum.nextElement();
    System.out.println("Returned a " + o.getClass().getName());
    if (o instanceof XMLElement)
    XMLElement xml = (XMLElement)o;
    xml.print(System.out);
    else
    System.out.println("Returned " + o.toString());
    catch (Exception e)
    e.printStackTrace();
    public static void main(String[] args)
    MainClient mainClient = new MainClient();
    Mike.

Maybe you are looking for

  • PRE9 Project Settings questions

    I just got PRE9 and I am working on my first video.  The question I have is about project settings and resolutions, etc.  I want to output the video to both DVD and to a file that can be copied to a USB thumb drive and plugged into my l 55in HDTV for

  • MAJOR HD PROBLEMS..disc cant be deactivated,  trying to reformat and reinstall osx

    As the title mentions, I cant seem to partition my HD in order to properly reformat and then reinstall osx.. I basically want a fresh new factory macbook with the original lion osx (dec 2011 macbook).. Reasons why its not working out: Macbook when tu

  • Project Overview Report

    Hi there, I have created a simple excel report using an OData feed which shows the total cost per project and also the total baseline cost per project. The projects themselves are made up of summary tasks with sub tasks within them. The problem I hav

  • How to execute immediately a query in a form

    Hi, I've got a form which opens another form on which I have created a data block based on a FROM clause query where the where clause has a column joined a GLOBAL variable initialized in the first form. How can I get the second form execute immediate

  • I am receiving an error code EX11 during CC installation from Creative Cloud

    I am receiving an error code EX11 during CC installation from Creative Cloud.