Consumming java webservices in coldfusion

could somebody show me how to consume this webservice from
within coldfusion?
http://www.ripedev.com/webservices/ZipCode.asmx?WSDL"
right now I invoke it as follows:
<cfinvoke
webservice="
http://www.ripedev.com/webservices/ZipCode.asmx?WSDL"
method="ZipCodeToCityState" ZipCode="12210"
returnvariable="returnedText" >
</cfinvoke>
<cfoutput>
#arraylen(variables.returnedText)#
</cfoutput>
And this is what i get
com.ripedev.xsd.ZipCodeResults_xsd.ArrayOfAnyType@aaa1d576 .
This actually has no meaning to me.
Thanks
amos

I'm just learning how to consume webservice stuff but this
should help as I got a result. See my code snippet below.
Basically I did some cfdumps to see what the objects look
like. This is from an empirical view as I don't understand yet. The
object comes back with methods. You then use those methods to get
values. I chose to use the getAnyType method. I did this as I used
another tool, soapscope from www.mindreef.com (30 day eval) which
really simplifies how to call webservices. It's worth the cost.
Basically I invoked the service via soapscope and looked at
the returned xml.
It looked like:
<soap:Envelope
xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ZipCodeToCityStateResponse xmlns="
http://ripedev.com/xsd/ZipCodeResults.xsd">
<ZipCodeToCityStateResult>
<anyType xsi:type="xsd:string">Albany,
NY</anyType>
</ZipCodeToCityStateResult>
</ZipCodeToCityStateResponse>
</soap:Body>
</soap:Envelope>
Note that the result was in a value of anyType. Thus I picked
getAnyType method
I hope this helps ya but I'm still quite a newbie to this.
This link help me understand a little more about webservice
http://tutorial292.easycfm.com/
Zip test WS Object
object of com.ripedev.xsd.ZipCodeResults_xsd.ArrayOfAnyType
Methods hashCode (returns int)
equals (returns boolean)
getSerializer (returns interface
org.apache.axis.encoding.Serializer)
getDeserializer (returns interface
org.apache.axis.encoding.Deserializer)
getTypeDesc (returns org.apache.axis.description.TypeDesc)
getAnyType (returns java.lang.Object)
getAnyType (returns [Ljava.lang.Object;)
setAnyType (returns void)
setAnyType (returns void)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
Breaking down the object
array
1 Albany, NY

Similar Messages

  • Problem while Consuming Java Webservice from WCF client

    Hi,
    I am trying to Consume Java Webservice from WCF client.The webservice main functionality is digital data management.The client can Query Digital data and upload digital data by calling webservice methods.Problem is when i am trying to call webmethod from WCF client its giving "Unrecognised message versions".I have no idea about how the message objects are processed at serverside.but at server side they have used JAXP for XML document parsing.
    The response content type is Multipart/related and applicatio/XOP+XML.
    Can u plz help me how to handle this situation.I have minimum knowledge in Java WS architecture.Basically i am .Net programmer.
    Can U please guide me in a proper way to resolve the problem.

    Hi Abinash,
    I have the same problem. Have you solve that problem?
    I am using a java program to call a webservice too. And I have generated the client proxy definition for Stand alone proxy using NWDS. When I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
    The java code to call the webservice is as follows.
    MIDadosPessoaisSyncService service = new MIDadosPessoaisSyncServiceImpl();
    MIDadosPessoaisSync port = service.getLogicalPort("MIDadosPessoaisSyncPort");
    port._setProperty("javax.xml.rpc.security.auth.username","xpto");
    port._setProperty("javax.xml.rpc.security.auth.password","xpto");
    String out = port.MIDadosPessoaisSync("xpto", "xpto");
    System.out.println(out);
    The result I am getting is :
    Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
    Error Message is :com/sap/guid/GUIDGeneratorFactory
    <b>The result of the WS is correct!!!</b>
    The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
    This method has a constructor name     MIDadosPessoaisSync.java     
    The import javax.xml.rpc.holders is never used     MIDadosPessoaisSyncBindingStub.java     
    The import javax.xml.rpc.encoding is never used     MIDadosPessoaisSyncBindingStub.java     
    The constructor BaseRuntimeException(ResourceAccessor, String, Throwable) is deprecated     MIDadosPessoaisSyncBindingStub.java
    It is very similar with your problem, could you help me?
    Thanks
    Gustavo Freitas

  • Java Dynpro - Consumed Java WebService - Not getting executed

    I have consumed a Java Web Service ( EJB ) in my Java Web dynpro code ( using Import Web service Model ( Not adaptive ))
    Successfully consumed.
    But the Web Service Model is not getting executed by this code -
    Request_CreatePortalUsrWebServiceViDocument_createUsr createPrtUsr = new Request_CreatePortalUsrWebServiceViDocument_createUsr();
         wdContext.nodeREQUEST_CREATEPORTALUSRWEBSERVICEVIDOCUMENT_CREATEUSR().bind( createPrtUsr );
    try {
         wdContext.currentREQUEST_CREATEPORTALUSRWEBSERVICEVIDOCUMENT_CREATEUSRElement().modelObject().execute();
              wdContext.nodeResponse().invalidate();
         } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    This Web Service resides on the local portal server.
    Thanks,

    Hi,
    First, have you tested that the web service works if you run it directly in the WS Navigator?
    Here is a snippet of how I usually call web services:
    public void getUserControlTable( )
        //@@begin getUserControlTable()
              //     Clear down existing context
              wdContext.nodeGetUserControlTable().invalidate();
              // Create model object
              DBMaint_ConfigServicesFactoryWS model = new DBMaint_ConfigServicesFactoryWS();
              // Create context elements
              Request_GetUserControlTable request = new Request_GetUserControlTable(model);
              GetUserControlTable method = new GetUserControlTable(model);
              request.setGetUserControlTable(method);
              // Bind to context
              wdContext.nodeGetUserControlTable().bind(request);
              // Call service
              try {
                   wdContext.nodeGetUserControlTable().currentGetUserControlTableElement().modelObject().execute();
              } catch (Exception ex) {
                   wdThis.wdFireEventDisplayDebugMessage(
                        "Error calling CanUserConfigureApp service - " + ex.getCause().toString());
                   wdThis.wdFireEventDisplayErrorMessage(
                        "Unable to read User Control table - configuration not currently possible",
                        null,
                        null);
                   return;
        //@@end
    I'm not sure why you aren't creating a model object as I cannot instantiate my objects without it - maybe it is because you are using a non-adaptive WS model.  Why aren't you using the adaptive WS Model?
    Also, I don't see where you are creating a method/operation object, you only seem to create the top level Request object.  I'd expect you to need to create the operation level object too and add that into the request, as I do above.
    There is little point in outputting the stack trace like that - I always use the message manager object to display errors and debug message on screen.  I think you should at least add some debug messages to try and pinpoint what is going wrong.
    Gareth.

  • Consume SharePoint Webservice with Coldfusion

    Has anyone been able to consume a SharePoint web service with
    Coldfusion? Any examples, resources or tips? A basic example would
    be to pull in a list.
    Thanks
    Dwight

    My group is also having trouble with this. The problems seems
    to be related to CF not being able to use NTLM authentication.
    Thanks,
    Tom

  • Consuming MII WebService in Java WebDynpro

    Hello,
    We are facing a strange situation...
    We define a transaction in MII to be consumed as WebService in Java WebDynpro. This transaction is a simple query on a DB returning 4 fields :
    Shift code : SHIFT
    Shift description : DESCRIPTION
    Start time : START_TIME
    End time : END_TIME
    It works fine, we use the import adaptative web service wizzard in netweaver developper studio to use this WS...
    But if we to an update on the webservice, changing a field name for example (SHIFT -> SHIFTCODE), we start to have trouble...
    We got then the very helpful error message :
    Exception on execution of web service with WSDL URL '<sever>/WebServices/GetShift' with operation 'Xacute' in interface 'XacuteWSSoap'
    If I display the model info using wdContext.currentRequest_XacuteElement().modelObject().associatedModelClassInfo().getModelInfo().toString()
    I got the following (extract) :
    <ModelClassPropertyInfo name="SHIFT" dataType="com.sap.tc.webdynpro.model.webservice.types.string(java.lang.String)" readOnly="false" qName="SHIFT" required="true" backendType="null"/>
    As you can see, the model definition is NOT updated and we still have SHIFT as name instead of SHIFTCODE...
    If someboby has an idea, it will save us our life ;o)
    Thank you
    PS:it the same behaviour if we add a field...

    Oliver -
    Did you try to reimport the WS model ..? If yes and still doesn't work...Try  to delete the old proxy in webdynpro ( adoptive ws) and import again.
    To avoid code changes,you can give same old name while fresh import.
    Adoptive WS in webdynpro  is not really like Adoptive RFC .It has some limitations.
    Thanks
    Hari

  • How to consume SOAP webservice in to my java/j2ee application

    Hi,
          I am a java developer. how to i consume SAP soap webservice in to my java application.
    scenario : 1
    We are migrating 2 specific java modules in to SAP System.But master details are stored in to my java application database.Those details are require
    to SAP application. So that they provide me WSDL file,  How to i consume soap webservice in to my java application and also, How to i provide master data details to SAP system through SOAP webservice.
    Any body provide me a detail instruction how to integrate SAP Application in to my java application using SOAP webservice. or
    In this scenario i will go for any one open source ESB to consume the soap webservice in to my java application, and provide master data to
    SAP application, can any one guide to me.

    Hi,
    What IDE are you using?, for example with Eclipse i used WSDL2JAVA plugin in this way i converted the WSDL in java classes easily. Depending your development environment you can use different tools that makes easier the integration using the WSDL.
    Regards.

  • Consume a webservice developed in other than coldfusion  in WS-Security mode

    1. What are the prerequisites (any software installation, configuration) to be considered ?
    Requirement : To consume a Webservice developed in other than coldfusion in WS-Secuirty mode .
    Environment used : Windows 2003, IIS 6, Coldfusion 8, SQl server 2005
    2. While trying to consume a public webservice through coldfusion , We received unable to read WSDL file and Unknown host exception error.Can you please advise. why we are receiving this error and solution ?

    Thanks Dan Bracuk, for your reply.
    What I could understand from Sivakarthikeyan post is that
    Point 1)
    It is mentioned that they are going to consume external webservices for which he would like to know whether any software/configuration is required to implement WS-Security (In IIS or coldfusion administrator)?
    Point 2)
    It could be a correct URL that he is using, from his description (2nd step) he gets a error message as "Unable to read WSDL file". If it of incorrect URL then he would have received file not found or other error message.
    Can you please or anyone clarify?
    Thanks,
    Satheesh

  • Consuming a Webservice is extremly slow

    Hi
    I would like to use a Webservice to communicate with a
    server. For test purposes I wrote a small java webservice which
    adds to numbers using the following 2 classes.
    == Class Calculator ==
    package de.theserverside.webservice.service;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.jws.soap.SOAPBinding.Style;
    @WebService
    @SOAPBinding(style=Style.RPC)
    public class Calculator
    public long addValues(int val1, int val2) {
    return val1 + val2;
    == Class CalculatorServer ==
    package de.theserverside.webservice.service;
    import javax.xml.ws.Endpoint;
    import de.theserverside.webservice.service.Calculator;
    public class CalculatorServer {
    public static void main (String args[]) {
    Calculator server = new Calculator();
    Endpoint endpoint =Endpoint.publish("
    http://<IP Adresse>/calculator?wsdl",
    server);
    In Coldfusion I tested both methods to consume this
    Webservice:
    <cfinvoke webservice="
    http://<IP Adresse>/calculator?wsdl"
    method="addValues" returnvariable="aString">
    <cfinvokeargument name="arg0" value="1"/>
    <cfinvokeargument name="arg1" value="6"/>
    </cfinvoke>
    <cfoutput>#aString#</cfoutput>
    == mit cfskript ==
    <cfscript>
    ws = createObject("webservice","
    http://<IP
    Adresse>/calculator?wsdl");
    xlatstring = ws.addValues(2,9);
    </cfscript>
    <cfoutput>#xlatstring#</cfoutput>
    The Webservice works with both methods but it takes between 5
    and 6 Minutes to get a result.
    I also wrote a java client to test the webservice which
    returned the result within 1 second.
    Whats the problem here with CF?
    I am using CF 8

    I found a third way to call a webservice using chttp. But now
    I have the problem that I cant pass paramaters to my method.
    I wrote a simple hello world method without any paramater and
    it worked within 1 sec.
    When I try to use the addValues method I get this Error:
    ns2:Serverjava.lang.IllegalArgumentException
    here is the CF Code
    <cfsavecontent variable="soap">
    <soapenv:Envelope xmlns:soapenv="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ser="
    http://service.webservice.theserverside.de/">
    <soapenv:Header/>
    <soapenv:Body>
    <ser:addValues>
    <arg0>6</arg0>
    <arg1>34</arg1>
    </ser:addValues>
    </soapenv:Body>
    </soapenv:Envelope>
    </cfsavecontent>
    <cfhttp url="
    http://<IP>/calculator?wsdl"
    method="post">
    <cfhttpparam type="header" name="content-type"
    value="text/xml">
    <cfhttpparam type="header" name="SOAPAction" value="">
    <cfhttpparam type="header" name="content-length"
    value="#len(soap)#">
    <cfhttpparam type="header" name="charset"
    value="utf-8">
    <cfhttpparam type="xml" name="message"
    value="#trim(soap)#">
    </cfhttp>
    <!--- Dump out a nice representation of the SOAP response
    --->
    <cfoutput>#cfhttp.FileContent#</cfoutput>
    <cfdump var="#xmlParse(cfhttp.FileContent)#">

  • Consuming external webservice in webdynpro

    Hi colleagues
    I am trying to consume a webservice "BORM_API_A1S_GET_UPD_SW_VECTOR" in webdynpro, it is an external webservice
    i have followed the below steps and ended up with an error
    Steps:
    1) created a Adaptive web service model
    2) got the WSDL source from "Remotelocation/fileSystem"
    3) given the WSDL URL Acess as "e:///C:\Documents and Settings\Desktop\BORM_API_A1S_GET_UPD_SW_VECTOR.wsdl"
    4) created a service group
    5) then i have done the " model to controller" binding and "controller to view" binding
    6) in the INIT method of controller i have creted the instance of the model and binded it to the context element
    7) set some some values in the init methiod(for input parameters)
    8) designed a view to get the values that are set into the input parameters
    9) Configured the service group
    i am getting an error saying    
    "*java.io.IOException: Cannot connect to https://service.sap.com:443/sap/bc/bsp/spn/swdc/slm/accessctrl.do, used user to connect: S0004119795, message : Unable to connect to service.sap.com:443 - service.sap.com*"
    I think i am doing wrong service confuguration
    steps i have followed to Configure the service group are given below
    1) logged into http://ldcidwd.wdf.sap.corp:50000/nwa
    2) SOA management-->technical information --> system connections
       here i have selected the provider systems tab, and created a new provider system of system type "Java"
    Here i need to provide someother information which i am not sure about what to provide, Could any one let me know what to be provided for the other fields
    u2022     System Type: Java
    u2022     System Name: <System ID> ?( what is this)
    u2022     Host: <Host>?
    u2022     System Description: My Web Service System
    u2022     Username: <Administrator>?
    u2022     Password: <Password for Administrator>?
    u2022     Profile Name: SAP_DEFAULT_PROFILE
    u2022     Mode: Multiple Services
    u2022     Services Source: WSIL
    u2022     WSIL URL: ?(what should be provided here
    u2022     Socket Timeout: 60.000
    Please let me know what shall i fill in this fields
    Thanks & Regards
    Swetha

    Hi Gayathri,
    i have opened the WSDL file and i found there are two URLS
    1) "<soap:operation
                        soapAction="http://www.sap.com/BORM_API_A1S_GET_UPD_SW_VECTOR" />"
    2)<soap:address
                        location="http://pwdf4431.wdf.sap.corp:1080/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/bosf_swdc_slm/accessctrl.do" />
    i have tried pasting the address URL ina n other IE and i was asked for Authentication
    Thanks & Regards
    Swetha

  • Consuming a WebService

    Hi All,
    Im following this help doc to build an application to consume a webservice.
    http://help.sap.com/saphelp_nw04/helpdata/en/81/12703e5da3e946e10000000a114084/frameset.htm
    What I want to understand is the following :
    In point no 7. What configuration do I need to do with the logical port.
    7. If necessary, configure the logical port.
    In point no 8. What is SEI and how do I program my application using the SEI.
    8.  Program your application using the service endpoint interface (SEI).
    What does the below mean? This is point no 8 continued.
    When programming a client application, you receive a stub that implements the service endpoint interface through the implementation class of the service interfaces.
    Transfer the Web Service Client API to the Java project class path that contains the client application. You can also add the Client API JAR file from the context menu of the Java Explorer in the Web Service perspective.

    Hi
    I have created a deployable proxy for this webservice. I have now created a EAR and have deployed this EAR on the JAVA WAS.
    Then I have added the JAR file of this JAVA Proxy into my project using->Project->Properties->Add Jars.
    The question is how do I use this proxy now.
    Thanks

  • Consuming a webservice and attributes

    I'm trying to noodle my way thru consuming a webservice and
    it is not making sense when I'm trying to get attributes from a
    webservice. Can someone point me in the right direction. I've
    included what the xml output looks like and my cfinvoke and a
    cfdump of the invoke return variable. I just don't know how to
    bring back that array of course ids??
    The service returns course ids
    <?xml version="1.0" encoding="utf-8" ?>
    - <Courses>
    <Course CourseID="1167" CourseName="Human Performance
    Tools - Self Checking" />
    <Course CourseID="1168" CourseName="Human Perfomance
    Tools - 3 Way Communication" />
    <Course CourseID="1169" CourseName="Human Performance
    Tools - Phonetic Alphabet" />
    <Course CourseID="1170" CourseName="Human Performance
    Tools - Pre-Job Briefing" />
    <Course CourseID="1171" CourseName="Initial Plant Access
    Training" PadsCode="PAT034" />
    <Course CourseID="1172" CourseName="Initial Radiation
    Worker Training" PadsCode="RWT" />
    <Course CourseID="1224" CourseName="Plant Access Requal
    Training" PadsCode="PAT034" />
    <Course CourseID="1225" CourseName="RWT Requal Training"
    PadsCode="RWQ" />
    <Course CourseID="1226" CourseName="Proctoring
    Responsibilities" />
    <Course CourseID="1235" CourseName="Generic Confined
    Space" />
    <Course CourseID="1236" CourseName="Generic Fall
    Protection" />
    </Courses>
    object of
    org.tempuri.LMSWebSvc.LMS_Interface.GetCoursesResponseGetCoursesResult
    Methods hashCode (returns int)
    equals (returns boolean)
    getSerializer (returns interface
    org.apache.axis.encoding.Serializer)
    getDeserializer (returns interface
    org.apache.axis.encoding.Deserializer)
    getTypeDesc (returns org.apache.axis.description.TypeDesc)
    get_any (returns [Lorg.apache.axis.message.MessageElement;)
    set_any (returns void)
    getClass (returns java.lang.Class)
    wait (returns void)
    wait (returns void)
    wait (returns void)
    notify (returns void)
    notifyAll (returns void)
    toString (returns java.lang.String)

    I found a way to get the soap request into an xml document.
    It was not intuitive to me but works.
    Basically rereading this post:
    http://www.houseoffusion.com/cf_lists/messages.cfm/forumid:4/threadid:44797#233359
    gave me more insight. The tostring function appears to allow me to
    get the raw xml that CF is struggling to noodle out.

  • Error in Consuming Portal Webservice

    Hi ,
    I created a portal web service(RetrieveAndValidateUserService) and then consumed this portal service in an AbstractPortal Component application(RetrieveValidateUserComp).
    On deploying that application on portal I get the following error -
    #1.5#001372247F6F00640000001C000011600004542B1E4EA3FD#1218444075594#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#Administrator#34878##PUNITP84649D.ad_SYN_3160950#Administrator#2b7b0eb0678111ddb00a001372247f6f#SAPEngine_Application_Thread[impl:3]_4##0#0#Error#1#/System/Server#Java###Exception ID:02:11_11/08/08_0002_3160950
    [EXCEPTION]
    #1#com.sapportals.portal.prt.component.PortalComponentException: Error in init method
    Component : RetrieveAndVAlidateUser.RetrieveValidateUserComp
          at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
          at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
          at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
          at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
          at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:435)
          at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
          at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
          at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
          at java.security.AccessController.doPrivileged(Native Method)
          at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
          at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
          at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
          at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
          at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
          at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
          at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
          at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
          at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
          at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
          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:100)
          at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.pseg.test.webservice.RetrieveValidateUserComp of Portal Component RetrieveAndVAlidateUser.RetrieveValidateUserComp because: Could not instantiate implementation class
          at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:269)
          at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
          at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
          at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
          at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
          ... 26 more
    Caused by: com.sapportals.portal.prt.core.broker.PortalApplicationNotFoundException: Could not find portal application RetrieveAndValidateUserService
          at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:415)
          at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:387)
          at com.sapportals.portal.prt.core.broker.PortalApplicationItem._refresh(PortalApplicationItem.java:507)
          at com.sapportals.portal.prt.core.broker.PortalApplicationItem.getCoreLoader(PortalApplicationItem.java:1360)
          at com.sapportals.portal.prt.core.broker.PortalComponentItem.getClassLoader(PortalComponentItem.java:569)
          at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getClassLoader(PortalComponentItemFacade.java:102)
          at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
          ... 30 more
    1. I added a Private Sharing Reference Property in portalapps.xml of the application -
    <application-config>
        <property name="PrivateSharingReference" value="com.pseg.webservice.RetrieveAndValidateUser"/>
      </application-config>
    2. I modified the Java-Build Path to include the Portal Service Application.
    3. I deployed the Webservice par on the portal. I can see the service listed under Applications in
    System Administration->System configuration->Service Configuration.
    Is there anything i am missing or doing incorrectly?
    Points will be promptly awarded for helpful answers.

    Hi Lokesh
    I created a Portal Service consuming a webservice.
    It turns out the Private Sharing Reference that i gave had some fault. That's corrected now.
    Now on deploying the Portal Application I created for accessing the service, i am getting the following error -
    java.lang.Exception: The parameter Accounts is null before the serialization but in WSDL definition this field cannot be null
    Here, we need to pass this parameter "Accounts" as NULL only, for test purpose.
    Points will be awarded generously in case of helpful answer.

  • 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>

  • Consume Axis2 webservice in a JSP using Tomcat

    Hey,
    I desperately try to consume a Netbeans created Axis2 web service in a jsp.
    i am able to consume the web service in a Java test class as well as in j2me using the created stubs from WTK.
    But now I would like to consume the webservice in a jsp.
    First i tried to use the netbeans client generator (which does work out in a regular test class), As soon as i try to invoke the webservice in the jsp, i get an exception (i currently don't have access to the exact message, i will append that asap) . It stated, my part tag needed a type value (currently there's an element attribute included as i am using document style). I tried the same using a hello world class generated by netbeans using netbeans stubs...same error.
    Then I switched to java2wsdl, when using those stubs, i got another exception "axis2 webservice could not be generated".
    Then i tried using a soap call with the axis service class for preventing auto generated stubs. all of the 3 ways did work out in a java test class.
    But now i get the following exception:
    org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: org.apache.commons.logging.LogFactory
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    org.apache.jsp.test_jsp._jspService(test_jsp.java:102)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803).
    The thing is: i did include the common-logging.jar in the project lib and it seems to work out smoothly when compiling. but at runtime i always get the same exception.
    i also put the library in the tomcat lib folder (after that in the lib/common folder) - same result. i tried downloading a new jar. still no changes (all of those folder arse included in my classpath).
    then i included the logging jar in my java/lib/ext folder.
    After that a new jar was missing (mail.jar). but my axis2 engine doesn't run anymore (apparently some conflict with other libraries).
    Now i dunno what to do anymore. even the simpelst hrllo world web service doesn't work in jsp.
    If i tried to invoke non axis2 webservices in a jsp - it does work out. but that's not an option for me

    There is a folder for shared packages
    tomcat_root\lib; or
    tomcat_root\common
    also most versions have a lib or common folder for each webapp for packages that are not to be shared.
    tomcat_root\webapps\appname\web-inf\lib
    Agreed that it is strange to allow servlets to import from the classes foler but not JSPs. It should make no difference but it is convension to place single classes in the same folder as the app's directory and packages (especially jar's) in the lib directory.

  • Consuming PI Webservice in Portal Components

    Hi
    How to Consume PI Webservice through Abstract Portal Component?
    Thanks
    Prasad

    Hi Sankar,
    If the webservice is working fine in the Wsnavigator then there is some problem with importing the webservice in webdynpro for Java. Please check the required parameter for creating the Adaptive Webservice Model. After adding in the used model and compoent controller binding, you need to write code for to execute the webservice model.
    Please check the code for initialization and execution for the webservice and then test it.
    Best Regards,
    Arun Jaiswal

Maybe you are looking for