Logical port definition dynamically

Hi all!
In ABAP I'm using a Web Service proxy class to call the web service. I'm aware that a logical port must exist that points to the location of the service.
I'm looking for a way in ABAP (not Web Dynpro) to determine / set the correct logical port dynamically at runtime.
I invoke the proxy as follows:
create object lo_clientproxy.
call method lo_clientproxy->aMethod
exporting
   input  = ls_request
importing
   output = ls_response.
I know that in web dynpro the logical port can be determined at runtime:
wdContext.current<Node>Element().modelObject()._setEndPoint("<Your URL>");
Is there a way in ABAP as well to set the logical port dynamically?
Regards,
Mathias

I've found it:
CREATE OBJECT lo_clientproxy
exporting
LOGICAL_PORT_NAME = LPORT.
LPORT would need to be a variable of type PRX_LOGICAL_PORT_NAME and contain the name of an existing logical port that had already been configured in LPCONFIG.

Similar Messages

  • Web service invocation problem on host hostname and port 8000 protocol : http logical port name : LP_WS_SMDAGENT_MONITORING

    hello colleagues,
    In the phase Connect Diagnostics dont show the Agent available in SLD, but when go to SLD i have the agents,
    Error,
    Connect Diagnostics Agent
    The table does not contain any data
    Agent availables in all SLD
    SOAP:1.007 SRT: Unupported xstream found: ("HTTP Code 401 : Unauthorized")
    Web service invocation problem on host hostname and port 8000 protocol : http logical port name : LP_WS_SMDAGENT_MONITORING
    Thanks

    OK, then pls follow below steps;
    - Go to step 'Create Users' in solman_setup System Preparation scenario and make sure the user SM_INTERN_WS has a green status. Use the 'Test Login' button to make sure the user is not locked and has correct credentials maintained in solman_setup
    - Immediately after checking the user status, navigate to Configure Connectivity->Enable Web Services and execute again the 'Create Logical Ports' automatic activity, in order to propagate the correct credentials to the Logical Port definitions.
    - If the above operation is not successful, repeat the two steps above, providing a different user Id in 'Create Users' step, eg SM_INTERN_W1. This will prevent situations where the user gets locked by Logical Ports using an obsolete password.
    Let me know the results.
    Regards,
    Vivek

  • STP Logical ports count calculations.

    Good day!
    As it stays in Cisco docs STP logical ports number is calculated by formula:
    Sum [(Each trunk on the switch) * (Active VLANs on each trunk)] + (Number of
    nontrunking interfaces on the switch)
    And this number can be checked by issuing command
    show spanning-tree summary total
    And i didnt find out any remarks that this number calculated differently for RSTP and MST, so i assume that calculations process is the same.
    I tried to check this number on my equipment and was a bit surpised with results:
    R1#show spanning-tree summary totals
    Switch is in mst mode (IEEE Standard)
    Root bridge for: none
    EtherChannel misconfig guard            is enabled
    Extended system ID                      is enabled
    Portfast Default                        is disabled
    Portfast Edge BPDU Guard Default        is disabled
    Portfast Edge BPDU Filter Default       is disabled
    Loopguard Default                       is disabled
    Platform PVST Simulation                is enabled
    PVST Simulation                         is enabled
    Bridge Assurance                        is enabled
    UplinkFast                              is disabled
    BackboneFast                            is disabled
    Pathcost method used                    is long
    Name                   Blocking Listening Learning Forwarding STP Active
    2 msts                       0         0        0         24         24
    Hm.. only 24 logical ports but lets check number of trunks in system and vlans that spans over those trunks:
    R1#show interfaces trunk
    -----Omitted for brevity----
    Port                Vlans allowed and active in management domain
    Po30                5,97,99,111,165,202,212-213,401-406,1521-1539,1600-1604
    Po31                97,165,401,405-406,1600
    Po41                1521-1539
    Po52                99,111,202,212-213,401,403-404
    Po70                97,165,401,405-406,1600
    Po71                97,165,200,401,405-406
    Po100               97,1603
    Po101               97,165,401,405-406,1600
    Po102               97,165,401,405-406,1600
    -----Omitted for brevity----
    So according to logical port definition only Po41 must have more STP logical ports  than i got in ouput of show spanning-tree summary total command.
    Can somebody clarify this?

    Good day.
    Sry, but i dint understand what mean "excluding logical vlans".  You mean reserved vlans:
    1002 fddi-default                     act/unsup
    1003 token-ring-default               act/unsup
    1004 fddinet-default                  act/unsup
    1005 trnet-default                    act/unsup
    If yes, than I have 40 vlans except those.
    Besides i can get you formula 11 vlans + 9 PC. As i addused the formula according to Cisco docs is:
    Sum [(Each trunk on the switch) * (Active VLANs on each trunk)] + (Number of
    nontrunking interfaces on the switch)

  • Dynamic Logical Port for Web Service Client

    Hi *!
    We want to use the same Web Service Client code with different Web Service instances running on different systems. So I need to configure the logical port (especially the URL of the endpoint) dynamically at runtime.
    Please give me a hint, how this is done.
    (we are using WebAS 6.40 SP7)...
    Thanks in advance,
         Frank

    Hi Frank,
    I hope you were able to solve your issue on you own in the meantime.
    I was looking for the answer to this question today. This was the only thread I found on SDN. Unfortunately, it did not contain an answer yet. I was able to figure out a way to set the endpoint address dynamically after searching help.sap.com and after examining the interfaces offered by the Stub (logical port in this case) classes.
    Here's an extract from my code:
    // Connect to JNDI context
    InitialContext ic = new InitialContext();
    // Get reference to web service proxy from JNDI context
    Z_MSC_GET_SCHEDULE_WSDService service =
         (Z_MSC_GET_SCHEDULE_WSDService) ic.lookup("wsclients/proxies/iot-online.de/msc~srv_ejb~proxy/de.iot_online.msc.proxy.ScheduleReaderProxy");
    // Get reference to logical port from web service proxy
    Z_MSC_GET_SCHEDULE_WSD logicalPort = service.getLogicalPort();
    // Set URL of web service Endpoint
    logicalPort._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://<FQDN>:8010/sap/bc/srt/rfc/sap/Z_MSC_GET_SCHEDULE_WSD?sap-client=100");
    This is explained on
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/113a1221337249e10000000a155369/frameset.htm
    You can also set the credentials (username / password) with the method _setProperty.
    Best regards
    Christian

  • Dynamical logical port creation

    Hi
    Is it possible to generate a logical port dynamically at runtime. I only need a logical port once for executing a web service, so I'm looking for a way to minimize administration work.
    Regards, Mathias

    hi gourav,
    thanks for a very helpful.. answer..
    but i am still getting the error Uninstantiated object "subject sidl service" in method IF_SRT_WSP_CONFIG_SIDL~CREATE_CLNT_CFG_FROM_WSDL_D of class CL_SRT_WSP_CONFIG_SIDL'.
    while creating the logical port....i am using endpoint URL from the wsdl ...i also tried seleting the wsdl file while cerating port..
    Also when i tried creting port for another consumer proxy it is working....so this is not a system issue
    what could be the problem

  • Dynamically define target address for logical ports (NW'04)

    Hello,
    when developing a web-service client using standalone proxy, you have to define the target address of a Web Service in the property-page for the Logical Port.
    We have the following problem. If, for any reason, the URL of the Web Service changes (i.e. the hostname or the port),  we have to rebuild the whole project and then redeploy the project.
    Is there a way to change this URL dynamically by java-code?
    Thanks in advance,
    Jarle

    Hi,
    You can get Server name Dynamically. You follow the below steps.
    1. Create a HTTP Destination in visual administrator which stores the server name and port.
    2. Access this variable in your controller init method and build your web service url with server name and port and use _setEndPoint() method
    String prefixURL = "http://";
    // your Service Address...remove the first part from service url.
    String serviceURL = "/TestService/Config1?style=document";
    DestinationService dstService = (DestinationService) obj;
    Destination destination = dstService.getDestination("HTTP","ApplicationServer");
    Properties destprop = destination.getDestinationProperties();
    HTTPDestination httpDestination = (HTTPDestination) destination;
    String serverName = httpDestination.getUrl();
    prefixURL = prefixURL + serverName;
    String testURL = prefixURL + serviceURL;
    Request<Obj> testReq = new Request<Obj>();
    testReq._setEndPoint(testURL);
    You need to import below files into your project.
    import com.sap.security.core.server.destinations.api.Destination;
    import com.sap.security.core.server.destinations.api.DestinationService;
    import com.sap.security.core.server.destinations.api.HTTPDestination;
    import java.net.HttpURLConnection;
    import java.util.Properties
    hope it solved your problem.
    Regards,
    Sridhar

  • How to Transport Logical Port in SOAMANAGER

    Hi Guys,
    I have created logical port in Developement system, so while moving my proxy class to staging system, do I need to create logical port again in staging by using SOAMANAGER or is there any way to transport Logical ports created with SOAMANAGER to different systems like Staging/ Production.
    Thanks,
    Santosh

    Hi,
    you need to create manually. As of standards no configuration information (url, password, transport protocol) etc transported because not necessary parameters supplied on DEV system are identical on QA or PROD system.
    You can transport webservice definition and configuration need to done again using SOAMANAGER.
    Regards,
    Gourav

  • Unable to create logical port

    Dear All,
    I have created a web service from a function module. I have also created a proxy for the web service.
    Before creating the logical port, I am also including the same port name in the endpoint of the service.
    My scenario is, I am creating and consuming the web service in the same server.
    While creating the logical port, the error
    SRT Framework exception: Uninstantiated object "subject sidl service" in method IF_SRT_WSP_CONFIG_SIDL~CREATE_CLNT_CFG_FROM_WSDL_D of class CL_SRT_WSP_CONFIG_SIDL
    is coming.
    Can anyone help me out with this please?
    Regards,
    Prosenjit.
    Edited by: prosenjit chaudhuri on Apr 30, 2009 4:39 PM

    Hi Prosenjit,
    I have received the same error when creating a logical port.  I believe that the issue may be to do with the default PI WSDL containing two <wsdl:port> definitions, one for HTTP and one for HTTPS.  I saved the WSDL locally, removed the <wsdl:port> definition for HTTPS (as I am only using HTTP) and then generated the logical port successfully, without receiving the error message.
    Please note that you must use the via File option, rather than via HTTP Access, as the HTTP version will still contain the two <wsdl:port> definitions.
    Please also watch out for Note 1325092, which means the URL Access Path (on the Transport Settings tab) is not set correctly.  If this Note applies, you may need to copy the complete URL from the WSDL into this parameter if it is not set correctly.
    Hope this helps.
    Cheers,
    Jon

  • Error activating logical port for service group

    Hi,
    I reconfigured the Starter Services because I changed the backend.
    It all worked fine, but in SOAMANAGER it throws an error when trying to activate logical ports for service group /IWCNT/BPC_SERVICE_GROUP (error is thrown for all 4 service groups he wants to activate)
    Configuration of proxy '/IWCNT/CO_BPC_CONT_BYID_QR_OB' failed
        Failed to create logical port for local shortcut.
             Service group '/IWCNT/BPC_SERVICE_GROUP' is not assigned to the own business system.
                Failed to create a logical port using Service Registry.
                    Use profile name = 'SAPLOGONPROFILE' version = '4'
                          Failed to create a logical port for inbound interfaceCustomerERPRelationshipContactPersonByIDAndContact'            'http://sap.com/xi/APPL/SE/Global'
                                 UDDI error: No Primary Services Registry maintained in this System.
    I checked:
    1. The provider system name
    2. WSIL works fine
    3. The profiles used are the same
    If i take a deeper look at the service groups there where no logical ports created.
    Thank you
    Regards
    Pit

    Hi Alex,
    I followed the steps mentioned in the guide (3.3.2) but it didn´t work at all.
    The services uses all the same profile. The profile is importet in the SCL.
    When I process the pending tasks this massages shown up:
      Failed to create a logical port using WSIL (This step is red)
      Use profile name = 'SAPLOGONPROFILE' version = '4'  (This step is OK = green)
      Target WSIL type SAP_6.40  (This step is OK = green)
      Failed to create a logical port for inbound interface 'CustomerERPRelationshipContactPersonUpdateRequestC' 'http://sap.com/xi/APPL/Global2'  (This step is red)
       Could not determine service using WSIL query  (This step is red)
    Is it normal that on the SCL, in the Business Scenario Configuration there are no entries in the Service Definitions for the Duet_Starter_Service_All scenario.
    Regards

  • SOA Management - setting up logical port for WS

    Hi
    I'm trying to use the RepositoryFrameworkWS from abap.
    During this i am setting up a logical pot for the webservice.
    This is done through the SOA Management.
    I find the consumer proxy CO_KMCWS_REPOSITORY_FRAMEWORK
    I then try to create the logical port.
    i use the wsdl
    http://<server>:<java_port>/RepositoryFrameworkWS/Config1?wsdl&
    when i apply the settings i get an error.
    SRT Framework exception: The WSDL document is not compatible with proxy class "CO_KMCWS_REPOSITORY_FRAMEWORK": "Operation(s)Missing setGlobalConfig, resetSessionStatistic, resetGlobalStatistic, getSessionStatistic,
    I know the operation i want to use(findResources). But I don't know how to set it up.
    Can anyone help me ?
    Best Regards,
    Rasmus

    Hi Rasmus,
    Please check the Service definition in the WSDL URL given for Logical Port creation is same as the Service definition in the proxy CO_KMCWS_REPOSITORY_FRAMEWORK. It seems to me that  some methods/ operations in th proxy could not be found in the Service definition in the WSDL URL.
    Download the WSDL from the URL and open it using some tool and compare the Service definition with that of the proxy.
    Regards,
    Avishek.

  • Error while parsing wsdl while creating logical port

    Hi all,
    I have a ABAP consumer proxy created. Now I want to create a logical port in SOAMANAGER.
    When parsing the wsdl, the error is:
    SRT Framework Ausnahme. Fehler beim WSDL-Parsen: Fehler in Base-URI: Relative URI testtt.wsdl erfordert Angabe einer absoluten Base-URI
    which is in english something like:
    SRT Framework exception:Error parsing WSDL: Error in Base-URI: Relative URI requires absolute base-URI
    Do you have any idea? The wsdl is very simple, just one binding, no nested schemas, no reference to https site.
    Thanks in advance,
    Rolf
    Edited by: R.M. on Dec 1, 2011 4:54 PM

    Further investigation gave SAP_note 1327511 (Limiations and common problems in ABAP WSDL processing). Did not find any problems with that.
    I also checked the wsdl with the report RSSIDL_DESERIALIZE_DEMO - it's ok!
    BTW, the system is of Release 700-Level 25. Here's a part of the wsdl:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://domain.de/b1tt/schema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://domain.de/b1tt/schema" targetNamespace="http://domain.de/b1tt/schema">
      <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://domain.de/b1tt/schema">
        <element name="SendRequest">
             <complexType>
                  <sequence>
                       <element name="name" type="string">
                       </element>
                       <element name="ordertype" type="string">
                       </element>
                       <element name="orderno" type="string">
                       </element>
                       <element name="workflow-id" type="string">
                       </element>
                       <element name="file" type="base64Binary">
                       </element>
                       <element minOccurs="0" name="signature-file" type="base64Binary">
                       </element>
                  </sequence>
             </complexType>
        </element>
    ...omitted some more elements equally defined...
    </schema>
      </wsdl:types>
      <wsdl:message name="SendRequest">
        <wsdl:part element="tns:SendRequest" name="SendRequest">
        </wsdl:part>
      </wsdl:message>
    ...omitted some more messages equally defined ...
      <wsdl:portType name="TestTT">
        <wsdl:operation name="Send">
          <wsdl:input message="tns:SendRequest" name="SendRequest">
        </wsdl:input>
          <wsdl:output message="tns:SendResponse" name="SendResponse">
        </wsdl:output>
        </wsdl:operation>
      </wsdl:portType>
      </wsdl:definitions>
    Edited by: R.M. on Dec 2, 2011 1:41 PM

  • RSA1 automatically creating port definitions

    When setting up BW connection to ECC and SCM systems, RSA1 auto creates port definitions using the generated A000000X format. I want to use a predinfed port like BIQ100 or BIP100 (source client format).
    Is there a way to use predinfed versus generated port defintion.
    Thanks
    Jexun

    Go to transaction WE20 and maintain the port in the outbound parameter in the correct logical system under partner type LS.

  • ** Logical Port in Client Proxy

    Hi Friends,
    I am doing proxy to web service scenario. My proxy is client proxy. After I created proxy, I checked that.  There is no standard method 'EXECUTE_ASYNCHRONUS'.   I read the Michal's blog /people/michal.krawczyk2/blog/2009/06/20/pixi-abap-proxies-say-goodbye-to-executeasynchronous-method and understand that this method is not created. The reason is that  SAP_BASIS support package level is 15. (Release 700) in our R/3 ECC 6.0 system.
    Now, I am not able to test my proxy from SPROXY tcode. It asks Logical Port.
    1. Can you tell me, what is logical port ? How do I create this in LPCONFIG tcode ?
    2. Once this is done, can I call the class with the method like in older version ?
    3. Currently I am getting the information 'No vendor specified' while test proxy withe empty logical port.
    Expecting your reply.
    Kind regards,
    Jegathees P.

    Hi Rene,
    If a logical port is not configured, the X/PI Runtime will be used instead.
    In Jegathees' case, this is probably what happened. If you want to route your message through PI then you need to make sure that you are pointing to your Integration Server (i.e. PI), on ECC use transaction code SXMB_ADM --> Integration Engine Configuration. Role of Business System should be "Application System" and "Corresp. Integration Server" should be your PI server.
    You will see when you test your client proxy (using TCode SPROXY) you have the option of choosing XI Runtime - or - Logical port too.
    Regards, Trevor

  • How to change a Logical Port URL-Destination/Endpoint at Runtime

    Hi,
    i am looking for a way to change the endpoint for a webservice-call without redeploying my application. (I am using a standalone-proxy).
    In the SAP-Help from NetWeaver 2004s I found the following hint:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    Configuring Logical Ports:
    Logical ports (LPs) contain the configuration of the client-side SOAP runtime, such as the access URL or security settings. These are required if Web service calls are executed using proxies.
    The Web service port is part of the WSDL description. This defines a URL where the service is to be called. As a rule, this URL is generated directly into the proxy object. However, this can cause problems whenever the proxy is transported into a system landscape (for example, from the test system into the productive system). In this case, the proxy would still attempt to call the Web service on the test server although the proxy should point to the productive system. The proxy could be re-generated or the coding could be changed manually. Due to the risk of errors with this method, the configuration data in the SAP Web Service Framework is separated from the implementation. After transport or re-deployment of the proxy, the URL and other important parameters can be adapted using a simple editor. 
    The LPs provided correspond to the Web service configurations created for the Web service.
    My Question:
    Where can I change the URL of the corresponding logical port at runtime?
    I don't want to redeploy my application !!!
    I want to change the endpoint-destination at runtime!!!
    In the Visual Administrator I can see the webservice in the "Web Services Container Service Administration". I also can see the different ports from the WebService-Configuration I made.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/c487d701c7214db8ca7a741ba3c9d0/frameset.htm
    But it is not possible to change the "target adresses"!
    Can anybody help me finding a solution concerning my question?
    Regards
    Steffen

    You can include below method in your code and call it.
    private void UpdateConfig(string key, string value, string fileName)
    var cFile = ConfigurationManager.OpenExeConfiguration(fileName);
    cFile.AppSettings.Settings[key].Value = value;
    cFile.Save();
    Here fileName is the full path + application name (eg: c:\project\WinApp.exe)
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • Error while creating logical port for Reporting

    Hi,
    In one of the training materials for Duet Enterprise, i saw the steps for creating logical port for the consumer proxy /IWTNG/CO_PXY_RECORDS_REPOSITO.
    When i am trying to create the logical port, i am getting an error saying,
    " SRT Framework exception: Error in WSDL access: Exception occurred in communication framework:Error in HTTP Framework:500 Native SSL error
    https://<server:port>/_vti_bin/OBAFileReceiver.asmx?wsdl "
    I would like to know is it really necessary to create this logical port for "Reporting Scenario" and is it not created automaticallly using the Installation Wizard??
    And in case it has to be created, how to resolve this SRT framework exception?
    ~ Ramanath.

    Hi,
    the consumer proxy  /IWTNG/CO_PXY_RECORDS_REPOSITO was used in Duet Enterprise SP01. Now with SP02 the consume proxy /IWTNG/CO_OBAFILE_RECEIVER_SOA is created.
    However, the SSL error that you are getting looks a little strange (it does not mean that there is an error, but it is worth checking):
    So can you go to SOAMANAGER -> Service Administration -> Single Service Configuration. In here select "Consumer Proxy" from the "Search by", Search Pattern "/IWTNG/CO_OBAFILE_RECEIVER_SOA" and Field: Both.
    You should find one entry. Select it and click "Apply Selection".
    Now go to the Configurations tab. Here you should see one Logical Port with name "LOGICALPORTFORREPORTING" with Creation Type "Manually Created". In fact this logical port was created by the Wizard.
    Click on Display and scroll down again. Now in the "Additional Information" tab there is a string after HTTP Destination, e.g. 0050568E3F5A1ED096F22339C44BAF83.
    Copy this value and go to your SAP GUI -> Transaction SM59.
    Here click on Find/Search and search for this HTTP Destination. You should find one Type G RFC Destination that has the target host of your SharePoint server and the path prefix /_vti_bin/OBAFileReceiver.asmx.
    Now you can test the service. Just click on Connection Test. The result should be a HTTP Response: 200.
    If not, then something went wrong with the automatic configuration and we should take another look at it (for example maybe the SSL certificate from SharePoint that was imported by the Wizard is not valid)
    Regards,
    Holger.
    PS. Don't use the "Ping Web Service" test from SOAMANGER -- unfortunately this is not working consistently.

Maybe you are looking for

  • Itunes version 7.6 and later will not open (no error message recieved)

    All Itunes versions before 7.6 work fine on my computer, i am currently using 7.4 because i can not use 7.6. However, with 7.4 i can't update my ipod because it is a newer ipod. I have installed, reinstalled and tried many other things to get 7.6 to

  • HP LaserJet p1005 windows 8 driver ?

    Hello, I've been waiting for a while to come out windows 8 64bit driver for my printer HP LaserJet p1005. The windows 7 driver doesn't find my printer. Please tell me at least how much longer will it take to come out, so I can take the appropriate me

  • No Backing File in Portlet

    Hi All, Is there any possibility of not having a backing file when we are implementing the IPC (Inter-Portlet Communication) in our portal application ?? Thanks in Advance Portal Developer

  • Fusion drive vs ssd 256gb which is better

    hoi gang, im in the market for a new mac mini. and i need some help with choosing the right options when buying it. " i do music " and i need a mini that fast and runs at the highest possible speed when making music. and of course using it for some f

  • Streams ORA-26767 is that a bug?

    Hi Streams masters got that error DOWNSTREAMS_CAPTURE 26744 ORA-26744: STREAMS capture process "DOWNSTREAMS_CAPTURE" does not support "ARADM IN"."DBMS_TABCOMP_TEMP_UNCMP" because of the following reason: ORA-26767: No enough redo log information for