How to fire a manager class when consuming web service in java - weblogic

With the help of Axis 1.4 I created client application that consumes the external server services.

The response of the application server with the soap message that include tags header as well as the body tag.

My problem with the header tag, I'm trying to find away to get the header element.

What happened so far:

I found that I need to use a handler that extends BasicHandler using this class, I can get the header tag. source: dealing with SOAP in the axis headers

But how this handler to operate during the use of web services? I mean how to call this handler whenever I received the response from the server to get his header .

Some articles suggest I should use .wsdd file. I use 11.1.1.7 with weblogic 10.3.6 Jdeveloper environment where I don't know web.xml configuration file.

Question: How to bind this information (Manager class, .wsdd file and web.xml ) to collect and the Manager works for the heading tags?

The best start was to check the Axis guide on: Apache-Axis reference Guide where you will have an overview of the workflow. (Thanks to Timo)

To configure the handlers be trigger on the client side you need to do the following:

1- Create class Manager basically something similar to the following:

package mypackge; 
 import javax.xml.soap.SOAPException;
 import org.apache.axis.AxisFault;
 import org.apache.axis.MessageContext;
 import org.apache.axis.handlers.BasicHandler;
 import org.apache.axis.message.SOAPHeader;
 import org.apache.axis.message.SOAPHeaderElement; 

 public class SoapHeaderConsumerHandler extends BasicHandler
 { 
     public void invoke(MessageContext messageContext) throws AxisFault 
     { // Your logic for request or response handling goes here. 
      // Basically you need to make use of the parameter 
     // messageContext where you can access the soap header and body tags. 
     } 
}

2- Create the client-config.wsdd file. It will look like the following:

http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  
       
           
      
  
 


You can see that I only use handlers for incoming response side server. So whenever the client application receives a response from the server the class Manager SoapHeaderConsumerHandler is triggered and the method invoke will be called by default.

Note: if you want to access the outgoing request before sending to the server you need to add an additional label for to add the request handler.

Check the Reference Deployment (WSDD) of the guide of the axis:

3- Where to place the client-config.wsdd file?

You will need to place the .wsdd file in the working directory. You can easily find the location of the working directory using:

System.out.println("Working Directory = " + System.getProperty("user.dir"));

Source: Get the Current Working Directory in Java

You just place the .wsdd file here.

Useful links:

Where to place the file client - config.wsdd in Railo

Handler axis V It is an example to managers of the side server.

Dealing with SOAP headers in the axis

Tags: Java

Similar Questions

  • How to consume web services REST in ADF - JDeveloper 11.1.1.6

    I have an ADF application deployed on Java cloud and I'm trying everything to try to get the data into it. I could not set up a connection to the Oracle Cloud server, to remedy this I created my db cloud instance RESTful web services. Now, I need to consume web services in my ADF application.

    Is there a way to link the ADF business components to RESTful web services in version 11.1.1.6?

    If not, then how is it possible to get data in your ADF application deployed on Java cloud? You cannot connect to the DB, you can not link to REST web services, how are you supposed to use your data?

    Thank you.

    Check out hands-on experience on Oracle products: deploy Oracle Cloud database objects using JDeveloper for the part of the database and hands-on experience on Oracle products: deployment of Applications in the cloud to Oracle using JDeveloper ADF on how to deploy an application in the cloud.

    Timo

  • How to use generated code of & quot; Import Web Services & quot; with Cairngorm framework

    I recently downloaded Flex Builder 3 beta 2 and try the wizard that allows you to import web services. The code that is automatically generated makes it so simple to consume web services using the types of objects defined in the WSDL file. Is no longer the developer don't need decode the XML load! The only problem I have is how you integrate the code automatically generated with the Cairngorm framework? This seems to be a huge issue for those who would exploit Cairngorm and code the proxy generated automatically in the same project (like me).

    Here are the problems I see so far.

    (1) how to configure the service generated class to work with the Cairngorm service locator? The service constructor only accepts a 'destination displays LCD chain' which means that you must use life cycle data services. Unfortunately, the project that I am in the process of renovation currently uses a Web service and does not use data services. All I really need to do is change the URL of the endpoint (that is, from the local level to a development server). This issue is noted in the bug https://bugs.adobe.com/jira/browse/FB-8456. I think there is a way to put the endpointURI in the Services.mxml file.
    (2) even if I come with a hack autour #1, I do not get a reminder for my same IResponder if I save it immediately after the method call. I can record and function of earphone within my business delegate and receive the reminder, but my command object that implements IResponder, did not call back even if it is registered. From what I've read in the ASDocs should be, but this isn't for me!

    These are the questions that I have observed in 3 hours to play with this. I hope this makes sense. I would like to integrate automatically generated in Cairngorm web service proxies, but I don't see a right lane to the front without redesign of Cairngorm. Has anyone else encountered this problem? If so, do you have any ideas on how to proceed? Any help is appreciated.

    Hi guys,.

    Now we focus on the generated code the right way and try to make it work for as many cases as possible. As soon as we receive some time we will try to see what is the best way to use Cairngrom.

    In the meantime, if you find a way or a great idea do not hesitate to post here.

    Thank you
    Cristian

  • Advanced Web services addition of Weblogic for JAX - WS extending resources to new managed server

    If we add a server managed additional to a weblogic domain that has been configured to support Web Services Advanced to Weblogic for the Extensions of JAX - WS in the creation of the domain, what is the right method to add the resources to the new managed server? All of these objects are created automatically when the wls_webservice_jaxws.jar is selected in the creation of the field. However, it is not possible to reuse the model to add resources to a newly added managed server.

    We tried to use the wls_webservice_complete_update_utils.py to create these objects, but when this script is pointing to a single server, it seems that to create the JaxWsSafAgent and no other resource is created for the new managed server.

    in the event of possible it helps someone who may have the same question, I got, I developed the following wlst script to add and configure the resources of JAX - WS Adv Svcs for a managed server newly added to an area that already has the support of the service.

    ###############################################################################

    # Oracle documentation:

    # Configure a JMS server, service agent of Store-and-forward (SAF) and store persistent on each WebLogic Server.

    # In a cluster, each to a target (not the server) local migratable target.

    # Host server 'default migratable target' is sufficient in most cases.

    # Target JMS modules to a cluster (or single server if not not using a clustered environment).

    # Create exactly a subdeployment by module.

    # and fill the subdeployment with JMS servers applicable or SAF agents only, not servers.

    # Target JMS destinations the subdeployment (called Advanced Targeting in the Administration Console).

    # JMS destinations do not use by default the targeting option.

    # The following variables are used in the table:

    server_designator # specifies an ID that is generated automatically by the configuration infrastructure.

    # In general, this ID is in the format auto_number.

    # uniqueID specifies a unique digital ID that is generated automatically by the configuration infrastructure.

    # In General, this ID is a numeric value, for example 1234.

    # servername specifies the name specified by the user to the server.

    # http://docs.oracle.com/cd/E23943_01/web.1111/e13758/setenv.htm#CACJHIJD

    # RESOURCE NAME                                                                                                                                                                         RESOURCE TYPE

    # WseeJaxwsJmsModule                                                                                                                                             JMS Module

    # File WseeJaxwsFileStore_server_designator storage

    # WseeJaxwsJmsServer_server_designator JMS server

    # WseeJaxwsJmsServeruniqueID JMS Subdeployment

    # Manager weblogic.wsee.jaxws.mdb.DispatchPolicy of work

    # Service ReliableWseeJaxwsSAFAgent_server_name SAF agent

    # Queue JMS WseeBufferedRequestQueue_server_designator

    # Queue JMS WseeBufferedRequestErrorQueue_server_designator

    # Queue JMS WseeBufferedResponseQueue_server_designator

    # Queue JMS WseeBufferedResponseErrorQueue_server_designator

    # WseeStore                                                                                                                                                                                      Logical store

    import sys

    import random

    # import os

    def main():

    Connect ("weblogic', ' password ',' t3: / / hostname:8001")

    domainType = "osb".

    # change the index value to coincide with the index number of the managed server

    # that needs resources, for example osb_server3 or wls_server3 would be all two use index = 3

    # osb_server4 would need to index = 4, etc.

    index = 3

    managedServerName = domainType + '_server %s' % index

    print ' managedServerName is: "+ managedServerName

    print (' check if server ' + managedServerName + "exists...")

    CD ('/Servers')

    Server = ls('c')

    If (servers.find (managedServerName)! = - 1):

    Print ('Server' + managedServerName + "exists...")

    # Get the Configuration Manager and check for existing session

    cfgManager = getConfigManager()

    Try:

    cfgManager.getChanges)

    Print ("failed to open an editing session.  Please clear any open the locks on the configuration. ")

    Print ("Please investigate the lock and try again the script. Script output. ")

    Disconnect()

    Exit()

    except:

    Edit()

    startEdit()

    Print ("creation WseeStore LogicalStore...")

    createLogicalStore (managedServerName, 1).

    Print ("WseeStore LogicalStore...")

    Print ('creating JMS resources and configuration UDQs...')

    createJMSResources (managedServerName, index)

    print ("resources created JMS and configured UDQs... »)

    Print ("activate changes...")

    Activate()

    Print ("enabled... changes")

    print ("disconnection of AdminServer...")

    Disconnect()

    Print ("disconnected from AdminServer...")

    Print ("Script completed successfully.  Please check the changes you made. ")

    Exit()

    Another thing:

    There are 0 =

    print (managedServerName + "does not exist in this area.)  Script will now stop. »)

    Disconnect()

    Exit()

    def createLogicalStore (managedServerName, setAsDefault):

    CD ('/ servers /' + managedServerName + ' / WebService /' + managedServerName + ' / WebServicePersistence /' + managedServerName + ' / ' WebServiceLogicalStores)

    logicalStores = ls('c')

    If (logicalStores.find ('WseeStore')! = - 1):

    Print ("ERROR: LogicalStore WseeStore exist already for ' + managedServerName")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD ('/ servers /' + managedServerName + ' / WebService /' + managedServerName + ' / WebServicePersistence /' + managedServerName)

    cmo.createWebServiceLogicalStore ('WseeStore')

    CD ('/ servers /' + managedServerName + ' / WebService /' + managedServerName + ' / WebServicePersistence /' + managedServerName + ' / WebServiceLogicalStores/WseeStore ')

    cmo.setPersistenceStrategy ('LOCAL_ACCESS_ONLY')

    cmo.setRequestBufferingQueueJndiName ('weblogic.wsee.BufferedRequestQueue')

    cmo.setResponseBufferingQueueJndiName ('weblogic.wsee.BufferedResponseQueue')

    If setAsDefault == 1:

    CD ('/ servers /' + managedServerName + ' / WebService /' + managedServerName + ' / WebServicePersistence /' + managedServerName)

    cmo.setDefaultLogicalStoreName ('WseeStore')

    def createJMSResources (managedServerName, index):

    targetServer = jarray.array ([ObjectName ('com.bea:Name =' + managedServerName + ", Type = server '")], ObjectName)

    # creating persistence store for jms Server

    # NOTE: you will need to create the physical folder for the storage of files

    print ('* FileStore creation ')

    filestore_list = ["WseeJaxwsFileStore"]

    Count = 0

    limit = 1

    While County<>

    CD ('/Deployments')

    Filestore = ls('c')

    Filestore = filestore_list [count] + '_auto_ %s' % index

    If (fileStores.find (filestore)! = - 1):

    print ("' ERROR: Filestore ' filestore + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    print ('* adding ' + filestore)

    CD('/')

    cmo.createFileStore (filestore)

    CD ('/ deployments /' + filestore)

    cmo.setDirectory (filestore)

    objectives (", target server)

    print ("Filestore" + filestore + "created")

    # create file storage directory, if there is no

    dir = System.getenv ('DOMAIN_HOME') + ' / ' + filestore

    Try:

    OS.stat (dir)

    except:

    OS.mkdir (dir)

    Count += 1

    # the server jms creation

    print ('* creating WseeJaxws JMS Server "")

    # create server jms WseeJaxwsJmsServer_auto_x

    CD ('/JMSServers')

    jmsServers = ls('c')

    If (jmsServers.find (' %s '% index WseeJaxwsJmsServer_auto_)! = - 1):

    print ("ERROR: WseeJaxwsJmsServer_auto_ % if % index + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD('/')

    cmo.createJMSServer (' %s '% index WseeJaxwsJmsServer_auto_)

    CD ('/ JMSServers/WseeJaxwsJmsServer_auto_ % if % index)

    cmo.setPersistentStore (getMBean ('/ deployments/WseeJaxwsFileStore_auto_ % if % index))

    objectives (", target server)

    targetWseeJaxwsJmsServer = jarray.array ([ObjectName ('com.bea:Name = WseeJaxwsJmsServer_auto_ % be % index + ", Type = JMSServer")], ObjectName)

    print (index "WseeJaxwsJmsServer_auto_ %s" % + "created")

    # creating WseeJaxwsJmsModule components

    print ('* create queues: index % WseeBufferedRequestQueue_auto_ % to + ', WseeBufferedRequestErrorQueue_auto_ % if % index + ', WseeBufferedResponseQueue_auto_ % if % index + ' and WseeBufferedResponseErrorQueue_auto_ % if % index)

    # check if subdeployment in WseeJaxwsJmsModule

    # targeted on the new JMS server already exists

    CD('/JMSSystemResources/WseeJaxwsJmsModule/SubDeployments')

    wseejaxwsSubs = ls ("c", returnMap = 'true')

    for wseejaxwsSub in wseejaxwsSubs:

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + wseejaxwsSub + "/ target")

    existingSubTargets = ls ("c", returnMap = 'true')

    for existingSubTarget in existingSubTargets:

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + wseejaxwsSub + ' / objectives /' + existingSubTarget)

    If (existingSubTarget == 'WseeJaxwsJmsServer_auto_ %s' % index):

    print (' ERROR: SubDeployment WseeJaxwsJmsModule ' + wseejaxwsSub + ' already exists and is intended for the %s '% index WseeJaxwsJmsServer_auto_)

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    # create subdeployment in WseeJaxwsJmsModule

    CD('/JMSSystemResources/WseeJaxwsJmsModule')

    # Number of eight random numbers to generate and convert to string

    # If the subname will conform to the standard naming convention

    # using numbers beginning with four to ensure it is random in existing facilities

    # and try to create some level of self-documentation to coincide with the index server

    uniqueID = str (random.randrange (00000000,99999900))

    subName = "%s WseeJaxwsJmsServer" % index + uniqueID

    cmo.createSubDeployment (subName)

    print ('SubDeployment' + subName + "created")

    # create queue WseeBufferedRequestQueue_auto_x

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Queues')

    queue = ls('c')

    If (queues.find (' %s '% index WseeBufferedRequestQueue_auto_)! = - 1):

    print ("ERROR: WseeBufferedRequestQueue_auto_ % if % index + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule')

    cmo.createQueue (' %s '% index WseeBufferedRequestQueue_auto_)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Files/WseeBufferedRequestQueue_auto_ % if % index)

    cmo.setJNDIName ('weblogic.wsee.BufferedRequestQueue_auto_ % if % index)

    cmo.setSubDeploymentName (subName)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + subName)

    Set ('Targets', targetWseeJaxwsJmsServer)

    print (index ' WseeBufferedRequestQueue_auto_ %s "% +" created")

    # create queue WseeBufferedRequestErrorQueue_auto_x

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Queues')

    queue = ls('c')

    If (queues.find (' %s '% index WseeBufferedRequestErrorQueue_auto_)! = - 1):

    print ("ERROR: WseeBufferedRequestErrorQueue_auto_ % if % index + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule')

    cmo.createQueue (' %s '% index WseeBufferedRequestErrorQueue_auto_)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Files/WseeBufferedRequestErrorQueue_auto_ % if % index)

    cmo.setJNDIName ('weblogic.wsee.BufferedRequestErrorQueue_auto_ % if % index)

    cmo.setSubDeploymentName (subName)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + subName)

    Set ('Targets', targetWseeJaxwsJmsServer)

    print (index ' WseeBufferedRequestErrorQueue_auto_ %s "% +" created")

    # create queue WseeBufferedResponseQueue_auto_x

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Queues')

    queue = ls('c')

    If (queues.find (' %s '% index WseeBufferedResponseQueue_auto_)! = - 1):

    print ("ERROR: WseeBufferedResponseQueue_auto_ % if % index + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule')

    cmo.createQueue (' %s '% index WseeBufferedResponseQueue_auto_)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Files/WseeBufferedResponseQueue_auto_ % if % index)

    cmo.setJNDIName ('weblogic.wsee.BufferedResponseQueue_auto_ % if % index)

    cmo.setSubDeploymentName (subName)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + subName)

    Set ('Targets', targetWseeJaxwsJmsServer)

    print (index ' WseeBufferedResponseQueue_auto_ %s "% +" created")

    # create queue WseeBufferedResponseErrorQueue_auto_x

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Queues')

    queue = ls('c')

    If (queues.find (' %s '% index WseeBufferedResponseErrorQueue_auto_)! = - 1):

    print ("ERROR: WseeBufferedResponseErrorQueue_auto_ % if % index + ' already exists!")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Exit()

    Another thing:

    CD('/JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule')

    cmo.createQueue (' %s '% index WseeBufferedResponseErrorQueue_auto_)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/Files/WseeBufferedResponseErrorQueue_auto_ % if % index)

    cmo.setJNDIName ('weblogic.wsee.BufferedResponseErrorQueue_auto_ % if % index)

    cmo.setSubDeploymentName (subName)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/SubDeployments /' + subName)

    Set ('Targets', targetWseeJaxwsJmsServer)

    print (index ' WseeBufferedResponseErrorQueue_auto_ %s "% +" created")

    print (queues "in the created WseeJaxwsJmsModule")

    # try except block is sufficient to avoid any problem if these queues

    # have already been added to the queues of dist WseeJaxws

    # If this is the case, the following exception is thrown:

    # weblogic.descriptor.BeanAlreadyExistsException: bean already exists

    Try:

    print ('* addition of the queues in distributed queues)

    queue_list = ['WseeBufferedRequestErrorQueue', 'WseeBufferedResponseQueue', 'WseeBufferedRequestQueue', 'WseeBufferedResponseErrorQueue']

    Count = 0

    limit = 4

    While County<>

    queue = queue_list [count] + '_auto_ %s' % index

    dist_queue = "dist_" + queue_list [count] + 'sent '.

    print ('* added ' queue + 'to' + dist_queue)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/DistributedQueues /' + dist_queue)

    cmo.createDistributedQueueMember (tail)

    CD ('/ JMSSystemResources/WseeJaxwsJmsModule/JMSResource/WseeJaxwsJmsModule/DistributedQueues /' dist_queue ' / DistributedQueueMembers /' ++ queue)

    cmo.setWeight (1)

    Print ("queue added to UDQ")

    Count += 1

    except:

    Print ("an exception was encountered adding JMS queues for distributed queues '")

    Print ("Please study using the thread dump information provided.'")

    Print ("the script will now stop.")

    cancelEdit('y')

    Disconnect()

    lift

    # create ReliableWseeJaxwsSAFAgent

    Print ("Creating ReliableWseeJaxwsSAFAgent_auto_ %s" % index + '...')

    CD ('/SAFAgents')

    safAgents = ls('c')

    If (safAgents.find (' %s '% index ReliableWseeJaxwsSAFAgent_auto_)! = - 1):

    print ("ERROR: SAFAgent ReliableWseeJaxwsSAFAgent_auto_ % index %s 'exists already for' + managedServerName")

    Print ("Please study.  Script output. ")

    cancelEdit('y')

    Disconnect()

    Another thing:

    CD('/')

    cmo.createSAFAgent (' %s '% index ReliableWseeJaxwsSAFAgent_auto_)

    CD ('/ SAFAgents/ReliableWseeJaxwsSAFAgent_auto_ % if % index)

    cmo.setStore (getMBean ('/ filestore/WseeJaxwsFileStore_auto_ % if % index))

    Set ('Targets', TargetServer)

    cmo.setServiceType ('Both')

    Print ('Created ReliableWseeJaxwsSAFAgent_auto_ %s "% index)

    If __name__ == "main":

    main()

  • How to transfer data from oracle to the web service using ODI with axis2 tech

    Hi all

    Can someone cause a document or markets about 'How to transfer data from oracle to the web service with the help of ODI with AXIS2 technology'
    If any person with a document or markets, please share it with me

    Thank you
    Phani

    I can give you a few examples of web services in ODI, perhaps that you find them useful?
    Try: -.
    http://John-Goodwin.blogspot.com/2009/04/ODI-series-Web-services.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-3.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-4.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • consume web service example

    HY,

    I try to consume a web service from the w3c: http://www.w3schools.com/webservices/tempconvert.asmx

    I also found an example on: Re: problem with apex_web_service.make_request after upgrade to 4.1.1.00.23

    But when I run the code I got the following XML:

    <?xml version="1.0" encoding="utf-8"?>
    <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>
            <soap:Fault>
                <faultcode>soap:Client</faultcode>
                <faultstring>Server did not recognize the value of HTTP Header SOAPAction: http://tempuri.org/FahrenheitToCelsius.</faultstring>
                <detail />
            </soap:Fault>
        </soap:Body>
    </soap:Envelope>
    

    My code is:

    declare

    l_envelope CLOB.

    l_xml XMLTYPE.

    l_temp varchar2 (4000);

    BEGIN

    " l_envelope: = ' < soapenv:Envelope xmlns:soapenv = ' http://schemas.xmlsoap.org/SOAP/envelope/ "xmlns:tem =" " http://tempuri.org/ ">

    < soapenv:Header / >

    < soapenv:Body >

    < tem:FahrenheitToCelsius >

    < tem:Fahrenheit > 71 < / tem:Fahrenheit >

    < / tem:FahrenheitToCelsius >

    < / soapenv:Body >

    < / soapenv:Envelope > ';

    l_xml: = apex_web_service.make_request)

                    p_url               => ' http://www.w3schools.com/webservices/TempConvert.asmx ',

                    p_action            => ' http://tempuri.org/FahrenheitToCelsius ',

    p_envelope = > l_envelope

    );

    l_temp: = apex_web_service.parse_xml (l_xml, "/ / FahrenheitToCelsiusResponse/FahrenheitToCelsiusResult/text () ' ','xmlns ="http://tempuri.org/"'");

    apex_debug.message ("Test:" | ") l_temp);

    l_temp: = l_xml.getStringVal ();

    : P1_XOUTPUT: = l_temp;

    END;

    I think that the line "p_action" is false, because http://tempuri.org doesn't work anymore.

    But what url should I use instead?

    with sincere friendships.

    ILB

    I had a few problems of namespace. now it works...

    declare

    l_envelope CLOB.

    l_xml XMLTYPE.

    l_temp varchar2 (4000);

    BEGIN

    "" l_envelope: = 'http://schemas.xmlsoap.org/soap/envelope/ "xmlns:tem ="http://www.w3schools.com/webservices/">."

    3

    ';

    l_xml: = apex_web_service.make_request)

    p_url-online "http://www.w3schools.com/webservices/tempconvert.asmx."

    p_action-online "http://www.w3schools.com/webservices/FahrenheitToCelsius."

    p_envelope-online l_envelope

    );

    l_temp: = apex_web_service.parse_xml (l_xml, "/ / FahrenheitToCelsiusResult/text () ' ','xmlns ="http://www.w3schools.com/webservices/"'");

    -l_temp: = l_xml.getStringVal ();

    : P1_XOUTPUT: = l_temp;

    END;

  • Consume Web service REST to 8.52 PT with JSON body

    We are on tools 8.52 and try to consume a web service from REST to the external address.  I have successfully built a document and I am able to use the GET operation (where no body is necessary), but for the POST, I need to be able to provide the body in JSON format.  8.52 tools is not supported with native support for JSON, but it should always be possible generate the JSON string manually, it should not?

    Has anyone else done this?

    I thought you said you were on PeopleTools 8.52. Support JSON for Documents has not been added up to 8.53. Add an element with the attribute psnonxml to your load XML and put your JSON in this element. Integration Broker will remove XML Integration Broker exit. You can see an example here: http://jjmpsj.blogspot.com/2011/10/rest-like-peoplesoft-services.html.

  • How to add exactly - once to call a web service

    Hi all

    I'm working on a project of OSB and it's proxy transport service use jca to listen to a folder. In the proxy service, we ask a business service that allows to call a service web http. Now, I want to add the exactly - once the proxy service after ws call option. However, this triggers an error, he said: setting quality of service exactly once in legend of service action is not supported for the BusinessService service SH-GetDealVOL/Services/Business Services/Call_StockService

    I searched on the Internet found this:

    BEA-382550

    Error: Implementation quality of service exactly one time in legend of service action is not supported for the name of the service

    Description

    Implementation quality of service exactly one time in legend of service action is not supported for the selected service. Quality of service is adjustable to exactly one time only if the endpoint of transport service is transactional and the model of one-way or synchronous message.

    Action

    Check the configuration of the pipeline to ensure that the quality of service is not defined at once via the Options for routing or any other action that alters the content of the variable message $outbound context. Action log allows you to see the value of any variable message context when executing.

    Now, as the web service's third party service, I don't know it is synchronous or asynchronous. If she is not synchronous, can I add the exactly - once?

    Any help will be great

    Thank you

    Daniel

    If the service you are calling supports transactions, meaning that he can start a new or registered in the existing transaction, you can assign to QoS to "Exactly Once" or not. You can go through the following link for design considerations.

    Design considerations - 11g Release 1 (11.1.1.6.3)

    Thank you

    Jahangir

  • German characters problem when calling Web Services via UTL_HTTP

    Dear members,

    I try to call the services of SAP CRM Web of Oracle PL/SQL. I used following code which works very well.
    -- call web service using Oracle UTIL_HTTP packages
    DECLARE
      http_req utl_http.req;
         http_resp utl_http.resp;
         lv_request VARCHAR2(32767);
         lc_response CLOB;
         lv_buffer VARCHAR2(32000);
         lv_name          VARCHAR2(256);
         lv_hdr_value     VARCHAR2(1024);     
         l_xml XMLType;          
    BEGIN     
         utl_http.set_persistent_conn_support(true);
         utl_http.set_transfer_timeout(600);
         
         http_req:= utl_http.begin_request
                                       ( url => 'http://xyz3ni92.server.xyz.com:8045/sap/bc/srt/xip/sap/crm_bupa_custid_qr/011/customersbycrmid/http_binding'
                                       , method => 'POST'                              
                                       );
         lv_request := '<?xml version="1.0" encoding="UTF-8"?>'
         ||'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/CRM/Global2">'
       ||'<soap:Header/>'
       ||'<soap:Body>'
          ||'<glob:CustomerCRMByIDQuery>'
             ||'<MessageHeader>'
                ||'<ID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ID>'
                ||'<UUID></UUID>'
                ||'<ReferenceID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ReferenceID>'
                ||'<ReferenceUUID></ReferenceUUID>'
             ||'</MessageHeader>'
             ||'<BusinessPartnerSelectionByBusinessPartner>'
                ||'<UUID schemeID="?" schemeAgencyID="?"></UUID>'
                ||'<InternalID>2200117598</InternalID>'
             ||'</BusinessPartnerSelectionByBusinessPartner>'
          ||'</glob:CustomerCRMByIDQuery>'
               ||'</soap:Body>'
         ||'</soap:Envelope>';     
         /*set username and password*/
         utl_http.set_authentication (
                   r => http_req,
                   username => 'WS_USER',
                   password => 'WS_PASSWORD',
                   scheme => 'Basic',
                   for_proxy => false);     
                   
         utl_http.set_header(http_req, 'Content-Type', 'application/soap+xml;charset=UTF-8'); 
         utl_http.set_header(http_req, 'Content-Length', LENGTHB(lv_request));
         utl_http.write_text(http_req, lv_request);
         /*Make HTTP call*/
         http_resp:= utl_http.get_response(http_req);
         
         /*read response text from response*/
         BEGIN
                   LOOP
                             utl_http.read_text(http_resp, lv_buffer);
                             lc_response := lc_response || TO_CLOB(lv_buffer);
                   END LOOP;
         EXCEPTION
                   WHEN OTHERS THEN
                        -- ora-29266 end-of-body reached
                        IF SQLCODE <> -29266 THEN
                                  RAISE;
                        END IF;
         END;
         utl_http.end_response(http_resp);     
         l_xml := XMLType(lc_response);
         /*Log response for testing*/
         DELETE FROM webservice_log;
         INSERT INTO webservice_log (seq_id,xml_response) VALUES (sqe_Webservice_Log.NEXTVAL,l_xml);
    EXCEPTION WHEN OTHERS THEN
              RAISE;
    END;
    However, if there are any German character in SAP, then they are replaced by UNWANTED data when they come to Oracle.

    If I invoke continues the same web service tools like SOAP-UI, then German characters do very well. I've also drawn web service queries and answers of the side SAP, and there response shows fine. When it comes to Oracle, they are themselves corrupt.

    I'm sure it's something to do with the character, but I am not able to find where and what should I fix/change.

    Thank you for your help in advance.

    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    NLS_DATABASE_PARAMETERS
    PARAMETER                      VALUE                                  
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN                                 
    NLS_TERRITORY                  AMERICA                                  
    NLS_CURRENCY                   $                                        
    NLS_ISO_CURRENCY               AMERICA                                  
    NLS_NUMERIC_CHARACTERS         .,                                       
    NLS_CHARACTERSET               AL32UTF8                                 
    NLS_CALENDAR                   GREGORIAN                                
    NLS_DATE_FORMAT                DD-MON-RR                                
    NLS_DATE_LANGUAGE              AMERICAN                                 
    NLS_SORT                       BINARY                                   
    NLS_TIME_FORMAT                HH.MI.SSXFF AM                           
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM                 
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR                       
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR             
    NLS_DUAL_CURRENCY              $                                        
    NLS_COMP                       BINARY                                   
    NLS_LENGTH_SEMANTICS           BYTE                                     
    NLS_NCHAR_CONV_EXCP            FALSE                                    
    NLS_NCHAR_CHARACTERSET         AL16UTF16                                
    NLS_RDBMS_VERSION              11.2.0.1.0   
    Kind regards
    Hari

    added other details by: Hari_639 on April 24, 2013 18:45

    I'm not really experienced with utl_http, but maybe you'll read on SET_BODY_CHARSET in the documentation.
    ISO-8859-1 is the default characterset, until you specify the characters in the attribute content_type and text media.
    But your media type is not text, then perhaps affecting the body charset UTF - 8 can help.

    concerning

  • Error object VO when calling Web Service.

    Hello
    I created a page with 5 field lookup with three buttons and text.

    The features are:

    1. as the page loads I call Web Service to set the values in the fields.
    2. when the user is entering new values or changed the old values and click on the 'save' button, new web service is called for that store values.

    Problem is when changing the value of choice of message. For the choice of the message that I created a VO lookup_code and sense.

    When I click on 'save' button it shows me error
    Attribute set for LookupCode in view object EncryptionModeVO1 failed
     
    Kind regards
    Ajay

    Well, you use certain methods (like setattributevalue, setrendered etc.) in processformrequest that goes against the standards. You must use SPEL approach wherever possible.

    You can hide the exception of developer mode. See thread Re: OAF: masking errors and Exceptions at the top of page OFA for details, but keep in mind that these errors may be valid in some cases.

    Thank you
    Shree

  • How to create the channel listens for XML/web services line

    Hi, I'm new to B2B 11 g, would ask tht,.

    I followed the tutorial of B2B using generic file and it works fine. However,.
    If I want to receive the trading partner thought web XML server, how can I configure the channel look, what protocol to use.


    And can any1 kindly refer me to any link or info?

    Thank you.

    However... If remote partner is going to send me thought web services and no thought record, should I do something on my B2B? has I need specific, any channel listen extra?

    N ° no additional configuration is required to receive files via HTTP. Just ask your TP to post files on one of the below URL.

    http://hostname:soa_server_port/b2b/httpReceiver or http://hostname:soa_server_port/b2b/transportServlet

    If you just want to test your B2B, if it is correctly configured best way is to have another facility of B2B (may be a new domain) who will laugh at your configuration TP. This configuration of B2B send message to your B2B on HTTP (on one of the above URL) and see if gets treated with success.

    If you just want to test if your B2B is ready to accept messages over HTTP, then go to the URL above browser and make sure that you see below message-

    "B2B Server is ready to accept messages HTTP from the trading partner.

    Kind regards
    Anuj

  • Conversion error in CFML arguments to the Java classes for the web service call.

    Hi all.

    I'm working on writing a small application that uses a web service that is provided by our IVR (Angel.com). I am able to connect, however, when I try to do something with complex objects, I get the error indicated in the title.

    He seems to have a problem with the table because when I remove it, or it becomes a simple string, I get errors on the function could not be found. I'm relatively new to web services, and especially dealing with complex data types, so any help would be appreciated.

    You can see my test page to

    http://webservices.fpitesters.com/AngelCalls.cfm

    I use the language WSDL can be found at

    http://www.Angel.com/outbound/WSDL/OutboundCallService.WSDL

    Some examples of code that does what I want to do in Java / Apache Axis

    http://www.Socialtext.NET/ivrwiki/index.cgi?java_sample_code

    Here is a description of the function that I have problems with

    http://www.Socialtext.NET/ivrwiki/index.cgi?placecall

    And my code is attached.

         <cfset email = "xxxxxxxxxxxxxxxxxx">
         <cfset pin = "xxxxxxxxxxxx">
    
    
         
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="login" returnvariable="login">
              <cfinvokeargument name="email" value="#email#"/>
              <cfinvokeargument name="pin" value="#pin#"/>
         </cfinvoke>
    
         <cfdump var="#login#">
         
         <cfset Token = login.getToken()>
         
         <cfdump var="#token#">
         
         <cfset CallItem.maxWaitTime = 100>
         <cfset CallItem.phoneNumbers[1] = "7632344306">
         <cfset CallItem.siteNumber = 100041>
         
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="placeCall" returnvariable="call">
              <cfinvokeargument name="Token" value="#Token#"/>
              <cfinvokeargument name="CallItem" value="#CallItem#"/>
         </cfinvoke>
         
         <cfdump var="#call#">
    

    If you are not initializing phoneNumbers tabular before adjustment

    
    

    It will be passed as a structure with a key of 1.  This could cause your conversion of argument error.

    So:

    
    

    Will result in

    struct
    MAXWAITTIME 100
    PHONENUMBERS
    struct
    1 7632344306
    SITENUMBER 100041
      
    

    Will result in

    struct
    MAXWAITTIME 100
    PHONENUMBERS
    Table
    1 7632344306
    SITENUMBER 100041

    -Jason Morgan

  • How to insert / remove a line via a web service

    JDev 11.1.1.2.0.
    Database Oracle 10 g.
    Same version of logic embedded in the JDev Web.
    I am very new on JDev ADF/from of a PL/SQL environment.

    I have an ADF application job that has all the basic features to maintain data in the table.

    I would like to add a web service to allow the same functionality using my existing entity/view objects to keep business in one place rules.

    I ran through the tutorial level "Hello World" http://www.oracle.com/technology/obe/obe11jdev/ps1/webservices/ws.html and I can create a web service that sets and gets the existing data.

    Maybe I missed it in there, but I do not see how to create or delete an existing record by using the generated java on my display objects or entities.

    Y at - it a somewhat more advanced tutorial out there somewhere who can show me how to add this feature?

    Hello

    If you use ADF BC, you can publish the methods (Create, Edit,...) of the VO´s through the Service Interface of the AppMOdule.

    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31974/bcextservices.htm#CJAJGIEB

  • How the Apple Watch manages activities when I switch the time zone?

    How the Apple Watch is managing the activities and objectives when I change the time zone?

    On a long distance flight with a time zone difference of nine hours, what would be the best time to switch to the time zone of the airport of destination, so that the objective of settlement can be completed, even if there is a shorter nine hour day?

    I did mine on the plane, he took no effect until he got a signal when we arrived at the airport. I guess you must ensure that your rings are made before you change the time zone.

    I found that you had to get all your exercises in the hours that were left in your day shortened to your destination.

  • Error: Could not find the com.sun.deploy.ControlPanel of the main class when tried to open the Java Control Panel

    Original title: could not open the Java Control Panel

    I just downloaded a new update of Java 6 and it doesn't work. I use Java to view charts & graphs of changes in the stock market & it works with applications that I used before, but not for that I started to use after the new update has been installed.

    I tried to fix it by clicking on the Java Control Panel & I get this message:

    Class main com.sun.deploy.ControlPanel is not found

    How can I fix?

    Hi Chris240560,

    Try to Uninstall and reinstall java and check the result.

    For further assistance, we recommend you to make contact with The team of Support of Java for better assistance.

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for