Quantcast
Channel: SCN : Unanswered Discussions - Service-Oriented Architecture (SOA) and SAP
Viewing all 360 articles
Browse latest View live

Change Soap Header in P2P WebService (No PI available)

$
0
0

Hi Experts,

 

I need your help with a Webservice we are building.

--Facts--

  • We have the requirement to build a WebService in CRM that will be consumed by an external system. (We are service Providers)
  • Since we have no PI available we are building it as a Function Module that will be later transformed into a WebService.
  • The WebService / communication will be Asynchronous. We want to use WS-Adressing to handle the asynchonous process. (Check the requirement Backgroud at the end)
  • We have a sample xml message in which we need to base and build the service WSDL based on:

<?xml version="1.0" encoding="utf-8" ?>

-<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/">

 

 

-<NS1:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">

 

 

-<requestHeader>

 

 

<systemID>DEFAULT</systemID>

 

 

<messageID>MSGID</messageID>

 

 

<aplicativoOrigen>bizagi</aplicativoOrigen>

 

 

<timeStamp>2014-12-06T20:24:33.839428</timeStamp>

 

 

<operacion>crearProspecto</operacion>

 

</requestHeader>

 

<wsa:To>http://127.0.0.1:7700/dummy</wsa:To>

 

 

-<wsa:ReplyTo>

 

 

<wsa:Address>http://127.0.0.1:7700/IA_asynchronousWS</wsa:Address>

 

</wsa:ReplyTo>

 

<wsa:MessageID>414d51204d4237514d47522020202020484f835403110120</wsa:MessageID>

 

 

<wsa:Action>crearProspecto</wsa:Action>

 

</NS1:Header>

 

+<NS1:Body>

 

 

-<crearProspecto xmlns:ges="http://grupobancolombia.com/intf/GestionarProspectosCRM">

 

 

-<datosGenerales>

 

 

 

 

<agenteRetencion>ac</agenteRetencion>

 

</datosGenerales>

 

</crearProspecto>

</NS1:Body>

</NS1:Envelope>

 

 

 

-- Background --

1- We have a CRM system with no PI and an external system (INT) to which we need to communicate in an Asynchronous way. Simply put, we need to provide to and consume from this non SAP System.
(This INT system is the equivalent of an SAP PI system and it will be responsible to transform and reroute the messages to the corresponding legacy systems)

 

2- We want to allow the creation of BPs in an Asynchronous way. The way we want to achieve Asynchronous communication is by means of two Web services.

    1. a.      CRM publishes a WS that is consumed by the INT (directly no PI)
      • In the header of this message we will be using WS-Adressing standard and receiving from the INT the MessageID field.
      • CRM receives the messages, stores the information (does not process it) and immediately sends an accepted HTTP 202 code as a response to the INT.
      1. b.      INT also publishes a WS that is consumed by the CRM and is used to receive the response of the first message from INT to CRM
        • After X amount of time (Hours or days), the CRM gets the stored data and processes it finally creating the BP in the system. Once the BP is successfully created, CRM Consumes this WS exposed by the INT and sends the information that the BP has been finally created. The RelatesTo field in the header is then matched with the MessageID field sent before in the WS-A header and this way the INT finds out to which original message this second Web Service correlates to.

 

3- Please consider no PI is available,

 

 

 

--Question--

How can we build a WSDL for this service? I am asking in specifically how do you build a WSDL with a header with 4 fields and WS-Adressing fields also. Keep in mind that we have no PI and we are using a Function Module to Build the Service.

 

-<requestHeader>

<systemID>DEFAULT</systemID>

 

 

<messageID>MSGID</messageID>

 

 

<aplicativoOrigen>bizagi</aplicativoOrigen>

 

 

<timeStamp>2014-12-06T20:24:33.839428</timeStamp>

 

 

<operacion>crearProspecto</operacion>

 

</requestHeader>

<wsa:To>http://127.0.0.1:7700/dummy</wsa:To>

-<wsa:ReplyTo>

<wsa:Address>http://127.0.0.1:7700/IA_asynchronousWS</wsa:Address>

 

</wsa:ReplyTo>

<wsa:MessageID>414d51204d4237514d47522020202020484f835403110120</wsa:MessageID>

<wsa:Action>crearProspecto</wsa:Action>

 

 

I am attaching the XML and a WSDL that was provided to us, but not generated by us in CRM. We need to create a service with a WSDL similar to that one in the CRM

 

Thanks!

Pablo.


SRT Framework exception: ICF: Error when creating service node. [rc:wrong_icf_name] No special characters allowed in name

$
0
0

Hi,

 

I have created a web service in SAP ECC from a RFC.

 

While configuring the web service in SOA management to publish it, getting error SRT Framework exception: ICF: Error when creating service node. [rc:wrong_icf_name] No special characters allowed in name

 

How to resolve the same.

 

Thanks

 

Tanmay

Enterperise web service (ESR)

How to consume a SAP service

$
0
0

Hello everybody.

 

I need to use an service from SAP, i'm using VB.NET, this Have User and Password, I obtain this message error:

 

Web service processing error; more details in the web service error log on provider side (UTC timestamp 20150206143904; Transaction ID 030FAEE4D227F1DCB523005056873367)

 

This is my code VB.NET:

 

    Dim client As New PMProxy.ZW0088Client("BN_MANI_0028")
    Dim response As ZFmM025Response
    Dim loginCredentials As New System.ServiceModel.Description.ClientCredentials

 

    Dim objetoS As PMProxy.ZFmM025Medicion
    Dim file(0) As PMProxy.ZstmanFileAmc

 

    Dim docFile As New PMProxy.ZstmanFileAmc

 

    loginCredentials.UserName.UserName = "User"
    loginCredentials.UserName.Password = "Password"

 

    client.Endpoint.Behaviors.Remove(GetType(System.ServiceModel.Description.ClientCredentials))
    client.Endpoint.Behaviors.Add(loginCredentials)

 

    docFile.Zkey = "AB"
    docFile.Zcode = "O1"
    docFile.ZText = "T51"
    file(0) = docFile

 

    objetoS = New PMProxy.ZFmMangl0022DocMedicion
    objetoS.PiAnula = strAnula
    objetoS.PtFileAmc = file

 

    'here the error
    response = client.ZFmM025(objetoS)

 

 

 

 

 

Please, any help will be grateful.

Regards!.

Access control on service definition within the PI service registry?

$
0
0

Hi, all

 

I know that you can assign the role services_registry_read_only to user so that he can read and run the web services defined in the PI service registry. But is there a way to fine tune the access control on the service definition. I want a user to only access certain service definition while not able to access the others. The reason is obvious as some of the web services are confidential.

 

Is there a way to do so?

Thanks,

Jonathan.

Service ECC_INVENTORY002QR - unexpected response content

$
0
0

Hi,

 

I'm testing enterprise service ECC_INVENTORY002QR / InventoryByLocationAndMaterialQueryResponse_In from package SAP APPL with a nonSAP application..

 

http://es-workplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?id=C4BA00F8860E11DB2B24000F20DAC9EF&fragID=&packageid=DE0426DD9B0249F19515001A64D3F462&iv=

 

SAP APPL 6.05 SP8 is installed at the ECC-System.

 

For given Location, LogisticsArea, MaterialID and BatchID I want to get the amounts of own stock and supplier consignemnt stock with unrestricted use.

For the supplier consignment stock the SupplierID is needed too.

 

There are 38276 pieces of unrestricted use supplier consignment stock at the logistics area.

 

The service seem's to work.

But I'm wondering about the extensive response.

 

There is always a section "ExpectedInventoryChange" with ChangeTypeCode=3 and ChangeReasonCode=15 in the response.

 

Blocked/Restricted stock is sent 3 times for own stock and 3 times for consignment stock.

 

Has anyone an idea why blocked/restricted stock is sent 3 times in the response or why the "ExpectedInventoryChange" is sent?

 

Is this the right place at SCN for this question?

 

Request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/APPL/Global2">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:InventoryByLocationAndMaterialQuery_sync>
         <InventorySelectionByLocationAndMaterial>
            <MainInventoryIndicators>
               <LogisticsAreaInventoryRequestedIndicator>true</LogisticsAreaInventoryRequestedIndicator>
            </MainInventoryIndicators>
            <SpecialInventoryIndicators>
               <SupplierConsignmentInventoryRequestedIndicator>true</SupplierConsignmentInventoryRequestedIndicator>
               <SeparateSupplierConsignmentInventoryBySupplierRequestedIndicator>true</SeparateSupplierConsignmentInventoryBySupplierRequestedIndicator>
            </SpecialInventoryIndicators>
            <Material>
               <ID>27295</ID>
               <BatchID>0003042687</BatchID>
            </Material>
            <Location>
               <InternalID>662L</InternalID>
               <LogisticsAreaID>LLES</LogisticsAreaID>
            </Location>
         </InventorySelectionByLocationAndMaterial>
         <ProcessingConditions>
            <UnlimitedQueryHitsIndicator>true</UnlimitedQueryHitsIndicator>
         </ProcessingConditions>
      </glob:InventoryByLocationAndMaterialQuery_sync>
   </soapenv:Body>
</soapenv:Envelope>

 

Response

 

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Header/>
   <SOAP:Body>
      <nm:InventoryByLocationAndMaterialResponse_sync xmlns:nm="http://sap.com/xi/APPL/Global2" xmlns:prx="urn:sap.com:proxy:S02:/1SAI/TASEDC559B282BDB746D3FE:702">
         <Inventory>
            <Location>
               <InternalID>662L</InternalID>
               <Description languageCode="de">Laage</Description>
            </Location>
            <LogisticsArea>
               <ID>LLES</ID>
               <Description languageCode="de">Endmontage SHI-2</Description>
            </LogisticsArea>
            <ExpectedInventoryChange>
               <ExpectedInventoryChangeTypeCode>3</ExpectedInventoryChangeTypeCode>
               <ExpectedInventoryChangeTypeName languageCode="de">Bestandsveränderung erw. eing. Material</ExpectedInventoryChangeTypeName>
               <ExpectedInventoryChangeReasonCode>15</ExpectedInventoryChangeReasonCode>
               <ExpectedInventoryChangeReasonName languageCode="de">In Umlagerung (von Lagerbereich zu Lagerbereich)</ExpectedInventoryChangeReasonName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
            </ExpectedInventoryChange>
            <Item>
               <InventoryUsabilityCode>1</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Frei verwendbar</InventoryUsabilityName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>3</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Qualitätsprüfung</InventoryUsabilityName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>2</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Gesperrt</InventoryUsabilityName>
               <AllRestrictedBatchesStockIncludedIndicator>true</AllRestrictedBatchesStockIncludedIndicator>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>2</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Gesperrt</InventoryUsabilityName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>2</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Gesperrt</InventoryUsabilityName>
               <ReturnsBlockedndicator>true</ReturnsBlockedndicator>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>1</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Frei verwendbar</InventoryUsabilityName>
               <InventorySpecialStockTypeCode>3</InventorySpecialStockTypeCode>
               <InventorySpecialStockTypeName languageCode="de">Konsignation Lief.</InventorySpecialStockTypeName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <SupplierParty>203621</SupplierParty>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">38276.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>3</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Qualitätsprüfung</InventoryUsabilityName>
               <InventorySpecialStockTypeCode>3</InventorySpecialStockTypeCode>
               <InventorySpecialStockTypeName languageCode="de">Konsignation Lief.</InventorySpecialStockTypeName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <SupplierParty>203621</SupplierParty>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>2</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Gesperrt</InventoryUsabilityName>
               <RestrictedUseIndicator>true</RestrictedUseIndicator>
               <InventorySpecialStockTypeCode>3</InventorySpecialStockTypeCode>
               <InventorySpecialStockTypeName languageCode="de">Konsignation Lief.</InventorySpecialStockTypeName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <SupplierParty>203621</SupplierParty>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
            <Item>
               <InventoryUsabilityCode>2</InventoryUsabilityCode>
               <InventoryUsabilityName languageCode="de">Gesperrt</InventoryUsabilityName>
               <InventorySpecialStockTypeCode>3</InventorySpecialStockTypeCode>
               <InventorySpecialStockTypeName languageCode="de">Konsignation Lief.</InventorySpecialStockTypeName>
               <MaterialID>27295</MaterialID>
               <MaterialDescription languageCode="de">RETAINER (CODE I)</MaterialDescription>
               <BatchID>0003042687</BatchID>
               <SupplierParty>203621</SupplierParty>
               <Quantity>
                  <InventoryQuantity unitCode="PCE">0.0</InventoryQuantity>
               </Quantity>
            </Item>
         </Inventory>
         <ProcessingConditions>
            <ReturnedQueryHitsNumberValue>1</ReturnedQueryHitsNumberValue>
            <MoreElementsAvailableIndicator>false</MoreElementsAvailableIndicator>
         </ProcessingConditions>
         <Log>
            <BusinessDocumentProcessingResultCode>3</BusinessDocumentProcessingResultCode>
         </Log>
      </nm:InventoryByLocationAndMaterialResponse_sync>
   </SOAP:Body>
</SOAP:Envelope>

error 'cx_ai_system_fault'

$
0
0

Hi,

I have tried to call a web service method and encountered this.

The rough process is as followed:

1, Creating an RFC and publishing it as web service

2, Go to SOAMANGER, some configuration in Single Service Admininstration and get a WSDL

3, Using the WSDL to generate a proxy class

4, Create an object of the class and call the method in my report

 

I have been searching Google and one thing I didn't do is to set logical port and I debug my CREATE OBJECT and found the parameter

logical port name of constructor is null. Is it the reason that caused a  'cx_ai_system_fault' error?

Calling IIS web service (using NTLM Authentication) from SAP Web AS Java failed

$
0
0

Hi,

 

I am trying to call web service to IIS using Window Authentication (NTLM) from my application (under SAP Web AS Java). However, it is giving me the error as below.

 

 

**********************************************************************

[EXCEPTION]

javax.xml.ws.WebServiceException: Invalid Response code (401). Server [http://xxx/Optimist8_Demo/IntegrationServices/LegalEntityService.svc] returned message [Unauthorized]. Http proxy info:  none

    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:174)

    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)

    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)

    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)

    at $Proxy624.searchLegalEntitiesByReferenceCode(Unknown Source)

 

**********************************************************************

 

 

 

I have already set the default authenticator (with the user and password). When I run the code locally on PC, everything work fine.

 

 

[Source code]

------------------------------------------------------------------

 

Authenticator.setDefault(new NtlmAuthenticator(user, password));

 

 

 

import java.net.Authenticator;

import java.net.PasswordAuthentication;

 

class NtlmAuthenticator extends Authenticator {

 

  private final String username;

  private final char[] password;

 

  public NtlmAuthenticator(final String username, final String password) {

    super();

    this.username = username;

    this.password = password.toCharArray();

  }

 

  public PasswordAuthentication getPasswordAuthentication() {

      System.out.println("Scheme:" + getRequestingScheme());

    return (new PasswordAuthentication (username, password));

  }

}

 

 

Please help.

 

Thanks.


How to transfet data to SAP MDG through web based .NET application?

$
0
0

Dear Experts,

 

 

     I am new to MDG. Could you please help to transfer Master Data from 3rd party MGD tool(web based .NET application) to SAP MDG? For an Instance I have to transfer 10 material master records from 3rd party MDG tool(web based .NET application) to SAP MDG. The same method I worked in LAN network using SAP.NetConnector 3.0 and BAPI object . But now I want to transfer via WAN/VPN/secured services. Do I need to approach web services? If yes, Please explain how.

 

Thank you.

 

-Janaraja

TransportBindingException: Invalid Response code (401). [Unauthorized].

$
0
0

Hello Experts.

 

I have create an ABAP provider system with SAP_DEFAULT_PROFILE for WS. I have set the runtime authentication as technical user and I am also able to see the web service when I ping the provider system.

When I try to test this web service through WSNAVIGATOR I get the following error message

 

TransportNindingException: Invalid Response Code (401). Server [http://<server>:<port>/sap/bc/srt/rfc/sap/zwam_get_approver_agent_wsd/400/zwammi_srv_apprv/zwammi_srv_apprv] returned message [Unauthorized]. Http Proxy Info: none


Please provide your valuable inputs.

 

Thanks & Regards

Gaurang Dayal

Exception occurred in communication framework:Error in HTTP Framework:500SSL Peer Certificate Untrusted

$
0
0

Hello All,

 

I am trying to create a consumer proxy for an external WSDL. However when i provide the WSDL URL i am being faced with the error

 

"Exception occurred in communication framework:Error in HTTP Framework:500SSL Peer Certificate Untrusted <followed by WSDL URL>

Exception of class CX_PROXY_GEN_ERROR".

 

Initially we thought that installing SSL certificate of the target could help. But still the error persists. I tried to search if any others faced such an issue & what was the resolution. Failing to get any answer i am here posting this as a query.

 

This error is there for some time, any help would be highly appreciated.

Consumer Proxy Generation-HTTP Framework Error

$
0
0

Hello All,

 

I tried to create a consumer proxy for an external WSDL.

 

However i am being faced with the following error

 

"Exception occurred in communication framework:Error in HTTP Framework:500SSL Peer Certificate Untrusted <WSDL link>

Exception of class CX_PROXY_GEN_ERROR".

 

Any help would be highly appreciated.

Exception occurred in communication framework:Error in HTTP Framework:500SSL Peer Certificate Untrusted

$
0
0

Hello All,

 

I am trying to create a consumer proxy for an external WSDL.

 

However i am getting the below error when i try to generate the client proxy

 

"Exception occurred in communication framework:Error in HTTP Framework:500SSL Peer Certificate Untrusted"

not able to configure soa manager for https url without port

ARIBA Integration : Error calling Webservice "CO_ARBFND_PRX_INVC_OUT"

$
0
0

Hello.

 

We use ARIBA direct integration without XI Middleware.

 

When trying to send a Invoice document from VF31 we get the following

error message in NAST processing:

 

"...ARBERP_NAST_CXML_MESSAGE Routine SEND_DOCUMENT"

"Payload-ID der cXML-Nachricht: 005056020A771EE4ADD38D145EA801A6"

"Error calling WebService " CO_ARBFND_PRX_INVC_OUT"

 

Webservice Runtime was configured correctly and Health check shows no

errors. Webservices (Service Definition and Consumers) are configured

as

described in ARIBA Administration Guide.


Local Repository SR_LOCAL is active and tested successfully.

 

Transaction SRT_MONI or SXMB_Monitoring showing no entries.

 

What maybe the root cause for this error and how to fix it ?

 

Best regards,

Sebastian


ABAP Proxy Client how to get the XML

$
0
0

Hi all,

 

I have created a Proxy Client by SE80 using the WSDL file, I no have any middleware as PI etc.

Testing it I'm facing with an error occurred on the server side. So the developers asked me to send them the full XML message with whom I call the service.

From se80 I can see only the body of the request I guess.

 

So I'm tring to understend where I can get the whole XML.

 

Any help will be appreciated.

 

Thank you,

 

Pasquale.

How to enforce ANONYM SSL Keystore when consuming external Web Service

$
0
0

Dear all,

 

I have to consume an external Web Service with HTTPS and Basic Authentication from an ABAP program. Consumer Proxy and Logical Port are ready. Everything works fine - but everytime when testing or using the Consumer Proxy, a dialog for username and passwort popus up. When I enter the same access data there that is already saved in the Logical Port in SOAMANAGER, then the call is successful.

 

Consequently, background processing fails with "Authentication required".

 

I found out that the DFAULT Keystore is used in the calls. However, I need to use the ANONYM Keystore, as we do not use client certificates.

 

How can I configure usage of the ANONYM key store / client identity for this Consumer Proxy and Logical Port?

 

Thank you for every hint,

Ringo

error 'cx_ai_system_fault'

$
0
0

Hi,

I have tried to call a web service method and encountered this.

The rough process is as followed:

1, Creating an RFC and publishing it as web service

2, Go to SOAMANGER, some configuration in Single Service Admininstration and get a WSDL

3, Using the WSDL to generate a proxy class

4, Create an object of the class and call the method in my report

 

I have been searching Google and one thing I didn't do is to set logical port and I debug my CREATE OBJECT and found the parameter

logical port name of constructor is null. Is it the reason that caused a  'cx_ai_system_fault' error?

No WSDL Validation at Application Level for Enterprise Web Services

$
0
0

Hello community,

We are building Enterprise Web Services in our application running on Netweaver 7.40 and have built several service definitions through the Enterprise Service Builder tool.   Ultimately the WSDL file that the builder creates is mapped to Java skeleton classes which define the API for the service endpoints thanks to Netweaver Developer Studios' 'Generate Java Bean Skeleton' functionality.    What we noticed was that during the processing of requests, the application was ignoring all validation imposed/defined in the WSDL definition.  

We're assuming that this type of validation is part of an operating Web Service implementation on any J2EE Application Container - including Netweaver - and the Container would be responsible for early validation stages of request processing, utilizing the Service definitions.  

 

Is it not part of the JSR-921 specification that compliant applications include a SOAP Processor that parses and validates a SOAP request that is submitted?   Where It is part of the responsibility of the SOAP processor upon receiving a Service request to validate and THEN relay the request to the appropriate Service method?

We could potentially validate our own but we have 100's of objects to manually validate against which becomes a very tedious and hard to maintain exercise.   It seems redundant and common behavior that should be handled at the Service layer by the SOAP processor within the Container should it not?

 

Validation capabilities seem to be provided by other vendor products such as Oracle AS and WebSphere.    Does anyone know if Netweaver offers this and if so how would we go about implementing it through configuration or otherwise?

 

Thank you!

Hanif

Problem using webservice method consumer proxy with rawdata from abap

$
0
0

Hello Gurus,

 

I am struggling with an error using a proxy consumer service from ABAP. The proxy was generated using the WSDL from the web service provider. For a specific method we need to send a rawstring as seen bellow:

 

1.png

2.png

3.png

 

The file to be sent on this call is a ZIP file XAdES-BES signed and on BASE64. I’ve implemented the proper code to get the original file from local PC, and convert it to BASE64 before moving the content to the webservice structure and call the service proxy. At SOAMANAGER I also configured the webservice and the proper port with the WSDL:

 

4.png

5.png

 

The communication is working properly but my problem is with the binary content. When calling the webservice the response is that the structure of the file is wrong. I found it very strange since I used a tiny SOAPUI project with the same WSDL and it worked with no problem.

After debugging I could see that the content moved to the rawdata string before calling the proxy does not match the content that I can see from the call payload on web services util (srt_util)!

 

So the sample code for my method:

 

* get the file from the specified folder
call function 'GUI_UPLOAD'
exporting
filename               
= ld_zipfilename
filetype               
= 'BIN'
importing
filelength             
= zip_size
tables
data_tab               
= t_zip_data[]
exceptions
file_open_error        
= 1
file_read_error        
= 2
no_batch               
= 3
gui_refuse_filetransfer
= 4
invalid_type           
= 5
no_authority           
= 6
unknown_error          
= 7
bad_data_format        
= 8
header_not_allowed     
= 9
separator_not_allowed  
= 10
header_too_long        
= 11
unknown_dp_error       
= 12
access_denied          
= 13
dp_out_of_memory       
= 14
disk_full              
= 15
dp_timeout             
= 16
others                  = 17.


* convert to string
clear buffer_zip.
call function 'SCMS_BINARY_TO_STRING'
exporting
input_length
= zip_size
importing
text_buffer 
= buffer_string
tables
binary_tab  
= t_zip_data[]
exceptions
failed      
= 1
others       = 2.

* encode base 64
perform encode_base64 using buffer_string
buffer_zip
. 

form encode_base64 using in_string type string
out_string
type xstring.

data: l_sbuff     type string.

* convert the file to BASE64
call method cl_http_utility=>encode_base64
exporting
unencoded
= in_string
receiving
encoded  
= l_sbuff.

call function 'SCMS_STRING_TO_XSTRING'
exporting
text   = l_sbuff
importing
buffer = out_string
exceptions
failed
= 1
others = 2.


endform.                    "encode_base64

 

calling the webservice:

l_input-xxxx-dokument = buffer_zip.

try.
call method l_proxy_test->webservice
exporting
input  = l_input
importing
output = l_output.

catch cx_ai_soap_fault into lr_exc_soap_fault.

    endtry.

 

From my understanding rawstring should be the same as ABAP xstring. If I debug the program and check the content of the  l_input-dokument before calling the proxy I get binary content: “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” that is in fact correct

6.png

If I check the payload after call I can see that the binary content sent on the XML is not the same, in fact it is totally different: ”SXp3L2VHMXNJSFpsY25OcGIyNDlJakV1TUNJZ1pXNWpiMlJw…” !!

 

7.png

I’ve tried a lot of different conversions, changed configuration on the communication, port, etc and nothing seems to work. I really can’t figure out why the binary content on the call is not the same as I move to the webservice structure.

 

If I use the project from SOAP UI and send the proper binary content, that is “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” it works perfectly and the response is successfully.

 

8.PNG

 

Anyone has a clue what could be causing this?

Appreciate any kind of input.

 

Regards,

João Silva Pinto.

Viewing all 360 articles
Browse latest View live




Latest Images