Absent Member.. Windextor92 Absent Member..
Absent Member..
309 views

XML document is expecting a start tag but finds an end tag??

I'm creating a web app uses ppm webservices to create request upon clicking a button. When I run this code locally, it works and the request is created however when I deploy it to weblogic and run my application I get this error:

org.apache.axis2.AxisFault: Internal error has occurred while calling PPM Web Service. Contact PPM Center support with the detailed information if the problem persists. (KNTA-11186) Details: Missing required data: Expected "{http://mercury.com/ppm/dm/service/1.0}requestObj" end tag, found "{http://mercury.com/ppm/dm/service/1.0}simpleFields" start tag (line -1, col -1, in SOAP-message).
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
    at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
    at com.mercury.itg.ws.dm.client.DemandServiceStub.createRequest(DemandServiceStub.java:902)
    at sechub.PPMGenerator.doPost(PPMGenerator.java:181)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

This is a snippit of the code (PPMGenerator), you can find the full java file attached
        
        CreateRequestResponseDocument outDoc = null;
        RemoteReference ref = null;
        
        try
        {
            CreateRequestDocument inDoc = CreateRequestDocument.Factory.newInstance();
            CreateRequestDocument.CreateRequest createRequest = inDoc.addNewCreateRequest();
            createRequest.setRequestObj(oRequest);
            
            response.getWriter().write(inDoc.toString() + "\n");
            System.out.println(inDoc);
            outDoc = stub.createRequest(inDoc);
            ref = outDoc.getCreateRequestResponse().getReturn();
            response.getWriter().write("request SUCCESS");
        }

The error occurs on the line "outDoc = stub.createRequest(inDoc);"

Here is the xml (inDoc):

<createRequest xmlns="http://mercury.com/ppm/dm/service/1.0" xmlns:ns="http://mercury.com/ppm/dm/1.0" xmlns:ns1="http://mercury.com/ppm/common/1.0">
  <requestObj>
    <ns:requestType>Eugene Test 3</ns:requestType>
    <ns:simpleFields>
      <ns1:token>REQ.DESCRIPTION</ns1:token>
      <ns:stringValue>description</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQ.DEPARTMENT_NAME</ns1:token>
      <ns:stringValue>Finance</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQD.VP.MODULE</ns1:token>
      <ns:stringValue>Module A</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQD.VP.PLATFORM</ns1:token>
      <ns:stringValue>Unix</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQD.VP.IMPACT</ns1:token>
      <ns:stringValue>Warning</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQD.VP.REPRO</ns1:token>
      <ns:stringValue>Y</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQ.STATUS_NAME</ns1:token>
      <ns:stringValue>In Progress</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQ.WORKFLOW_NAME</ns1:token>
      <ns:stringValue>Pru Operations Approval Workflow</ns:stringValue>
    </ns:simpleFields>
    <ns:simpleFields>
      <ns1:token>REQD.VP.TKN_OPS_NOTIFICATION</ns1:token>
      <ns:stringValue>Roger Rosa</ns:stringValue>
    </ns:simpleFields>
  </requestObj>
</createRequest>

all simple field tags are closed properly so I dont know why it's expecting a request obj tag.

Any help is much appreciated,

Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.