cancel
Showing results for 
Search instead for 
Did you mean: 

data collection for multiple parameters of same dc code using web services

Former Member
0 Kudos

Hi All,

I am trying to do data collection using LogParametricData method of ProductionService web service loaded in SOAP UI. I have one DC code with 3 parameters. when I try to do data collection I can do it for only one parameter in one SOAP request. and also  I would like to implement some validation on parameters like allow only numeric, date format should be DD-MM-YYYY. when I try these through POD its working fine. where as using web service I am facing issues, how do I achieve these using web service.

If want to use PAPI of ME 15.0 ,what is sample xml for using createParametricData or createMultipleParametricData methods.

below is the sample request xml I am using,

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

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<ParametricRequest_sync xmlns="http://sap.com/xi/ME">

<!-- for param 1--->

<ParametricRequest>

<DcGroupRef>

<DcGroup>MOULDING</DcGroup>

<Revision>#</Revision>

</DcGroupRef>

<ParametricMeasure>

<MeasureGroup>MOULDING</MeasureGroup>

<MeasureName>PARAM1</MeasureName>

<Actual>100</Actual>

</ParametricMeasure>

<ResourceRef>

<Resource>R_IM01_LINE</Resource>

</ResourceRef>

<SiteRef>

<Site>UD02</Site>

</SiteRef>

</ParametricRequest>

<!-- for param 2--->

<ParametricRequest>

<DcGroupRef>

<DcGroup>MOULDING</DcGroup>

<Revision>#</Revision>

</DcGroupRef>

<ParametricMeasure>

<MeasureGroup>MOULDING</MeasureGroup>

<MeasureName>PARAM2</MeasureName>

<Actual>200</Actual>

</ParametricMeasure>

<ResourceRef>

<Resource>R_IM01_LINE</Resource>

</ResourceRef>

<SiteRef>

<Site>UD02</Site>

</SiteRef>

</ParametricRequest>

</ParametricRequest_sync>

</s:Body>

</s:Envelope>

Thanks, Eshwar.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Dear Eshwar,

I've seen recently incidents (tickets) from other customers against LogParametricData method of ProductionService websercive, so it seems to be a bug.

Yet, I do not have information in what patch the fix should be available.

What ME version do you use? Could you re-test in the newest patch available?

Br, Alex.

Former Member
0 Kudos

Hi Alex,

Thanks for the reply,

I am able to do it for one dc code and one dc parameter. I am facing issue when there are more than one parameter in same dc code

I am using SAP ME 15.0.0.1. I have done the same way previously in ME 5.2.

Now I would like use PAPI (DataCollectionServiceWS).I have loaded the WSDL in SAOP UI and going to use createParametricData method for this purpose.

I am getting 'Authorization failed. Please check security log for details' message. I am using same user for both the cases.

Regards, Eshwar.

Former Member
0 Kudos

Hi,

I am using DataColectionServiceWS's createParametricData method in SOAP UI,

I am getting the following error when I test the method,

<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <SOAP-ENV:Body>

      <SOAP-ENV:Fault>

         <faultcode>SOAP-ENV:Server</faultcode>

         <faultstring>javax.ejb.TransactionRolledbackLocalException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBTransactionRolledbackException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'</faultstring>

         <detail>

            <ns3:ResolvedBusinessException xmlns:ns4="mepapi:com:sap:me:reasoncode" xmlns:ns3="mepapi:com:sap:me:datacollection" xmlns:ns2="http://www.sap.com/me/datacollection">

               <errorCode>0</errorCode>

               <message>javax.ejb.TransactionRolledbackLocalException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBTransactionRolledbackException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/me~ear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.datacollection.ParametricBOBean.log(com.sap.me.frame.Data) throws com.sap.me.frame.BasicBOBeanException method on bean instance com.sap.me.datacollection.ParametricBOBean@174e3c39 for bean sap.com/me~ear*xml|me.datacollection.ejb-150.0.1.jar*xml|ParametricBO in application sap.com/me~ear.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object loaded from local variable 'rev'

See the NetWeaver developer trace log for stack trace information.</message>

            </ns3:ResolvedBusinessException>

         </detail>

      </SOAP-ENV:Fault>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Can anybody got the sucess with Data collection creation using PAPI. sample XML would be helpful.

Thanks, Eshwar.

former_member196557
Active Contributor
0 Kudos

Hi Eshwar,

First, make sure you have access to the ME PAPI Javadocs for your version of SAP ME.  If you do not have them then check with your account team for access. You will need this access to be able to look up details about the methods and their arguments.

For a PAPI createParametricData where you have more than one ParametricMeasure to record (as defined in a DC Group), you will have to make a copy of the <datacollection:parametricMeasureList> mode and populate it for each ParametricMeasure that you wish to record. each copy should be inserted into the xml request either immediately befor oro after the original node.

Here are the required fields to permit execution of the createParametricData WS:

  • <datacollection:gboRef>DcGroupBO:TEST1,TEST1,A</datacollection:gboRef> this is a handle object of format: DcGroupBO:<site>,<DCGroup name>,<version>
  • if the DCGroup collection is against Resource assign the resource to

<datacollection:resourceRef><reference type="RESRCE">resource> node

  • if the DCGroup collection is against SFC, assign the SFC to the

<datacollection:originalSfcRef><reference type="SFC"><sfc/> node

  • if the DCGroup collection is against a Workcenter, assign the Workcenter to the

<datacollection:workCenterRef><reference type="WORK_CENTER"><workCenter/> node

  • <datacollection:type>MANUAL</datacollection:type>, if a test plan collection is being done use AUTOMATIC and assign the Test plan to the correct node.
  • <datacollection:testStatus>PASS</datacollection:testStatus> some test staus string
  • <datacollection:testPassed>1</datacollection:testPassed> 1/0 for pass/fail
  • <datacollection:userRef><reference type="USR"><userId>ME_UserName</userId> if a user is to be logged against the data collection

The following values are required for each parametricMeasureList node:

  • <datacollection:measureName>VALUE1</datacollection:measureName> from MeasureName defined in DCGroup
  • <datacollection:measureGroup>TEST</datacollection:measureGroup> name of the DCGroup
  • <datacollection:measureStatus>PASS</datacollection:measureStatus> Status text of some kind
  • <datacollection:dataType>NUMBER</datacollection:dataType> you will need to look in the javadocs to determine the acceptable values for this node, NUMBER is for numeric values
  • <datacollection:actual>50</datacollection:actual> the actual measure value to collect


Hope this  helps,

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Thanks for the reply,

Yes, I have access to java doc. I did the same way as you suggested.I am passing SFC details as gboRef. In the request Its asking for some parametricMeasureCustomList values.Is these custom values mandatory for this?

Thanks, Eshwar

Former Member
0 Kudos

Hi Steve,

I am doing same as you suggested however I am facing one more cerificate key issue. in my ME server SSL is enabled. url is HTTPS:<Server>:<Port>/manufacturing.

I am trying to use PAPI as HTTP:<server>:<port>/PAPI  WS path. so now I am getting the SSL certificate key issue.

how do I resolve this.

Thanks & Regards,

Eswar

former_member196557
Active Contributor
0 Kudos

Hi Eswar,

First you need to examine the NW settings for the PAPI web services to make sure that they are configured for HTTP and not HTTPS (From NW menu, : SOA Tab->Application and Scenario Communiction->Single Service Administration-><find PAPI WS>->Configuration Tab->Security Tab). It appears you can enable either one, but not both transports protocols.

You will obviously need a separate port to connect HTTP vs HTTPS as well.

I don't have an SSE enabled system against which to test

Regard, Steve


Former Member
0 Kudos

Hi Steve,


PAPI web services are configured for HTTPS. I should I go ahead in this case.

Thanks, Eshwar