Consumer Proxy - calling a webservice - XML transformation error
Hi
I had 3consumer proxy's of 3 wsdl's provided by 3 different 3rd party systems.
No issues with 2systems when i called from my se38 program, i am getting result set back.
but when calling 3rd proxy, no exceptions has been thrown by SAP, but result set is blank. I kept a break-point at call transformation (m_transformation) in method CL_SXMLP_DATA_STIF_SXML_SERIALIZABLEDESERIALIZE.
After call transformation, my OUTPUT structure does not get mapped from the response. Its empty.
But for the other 2 proxy's, at this point OUTPUT is mapped properly.
All the 3 proxy's are taking same request and giving same response(for example, if i send a Business Partner number, retunrning Address Details).
I am not sure whos problem is and i can see the response in SMICM(trace file) and SOAPUI is working fine.
Many thanks for any quick turnoutnd..
Rams
Hi,
what does the service?
XString listens to binary data.... With services you exchange xml messages (SOAP)... -> String
Maybe you have to convert your binary data into string?
I have created an email service... the attachments must be converted into a base64-String that a service can handle this issue.
regards
Similar Messages
-
Calling Web Service - XML Parse Error
Hello,
I have created Client proxy to call a Web Service. This service requires WS Header. This is my code to create the header:
concatenate
'<soap:Header>'
' <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
' <wsse:UsernameToken Id="uuid-90128b0b"> '
' <wsse:Username>User123</wsse:Username> '
' <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText">Pass123</wsse:Password> '
' </wsse:UsernameToken> '
' </wsse:Security> '
' </soap:Header> ' into l_string.
When I make the call, I receive the following error:
CODE SoapFaultCode:4
ERRORTEXT #XML parse error.#
If I comment out UsernameToken element, the errors says that UsernameToken is missing, once I added it, I get XML parse error.
Here is the info from trace file:
XRFC> <
XRFC> <
XRFC> INFO 09:40:16: SOAP SESSION Protocol CL_SOAP_SESSION_PROTOCOL <
XRFC> ->IF_SOAP_PROTOCOL~PRE_PROCESS() SOAP Session Protocol <
XRFC> preprocessed <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport Binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~SEND() Try to send message ( DEST = <
XRFC> CCTEST_AUC ,PATH = ,URL = ,SOAP Action = "runTransaction" ) <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport Binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~SEND() Message sent <
XRFC> <
XRFC> INFO 09:40:16: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT <
XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message <
XRFC> <
XRFC> INFO 09:40:16: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->HANDLE <
XRFC> STATUSCODE() Received return code 500 ( Internal Server Error ) <
XRFC> <
XRFC> ERROR 09:40:16: SOAP Message CL_SOAP_MESSAGE->IF_SOAP_MESSAGE <
XRFC> PART~INITFOR_DESERIALIZE() SOAP Fault Exception caught: :
XML <
XRFC> parse error.
<
XRFC> <
Does anyone know what could be the problem?
Thanks,
AlexI was able to fix the issue last night, it was caused by preparing WS header incorrectly. Originally, I did not use wsse prefix, and this was issue number 1. Once I added the prefix, I thought that the following code is incorrect because it was only retreiving 1 elements - UsernameToken.
xml_root = xml_document->get_root_element( ).
xml_element ?= xml_root->get_first_child( ).
* add header element by element to SOAP header
while not xml_element is initial.
name = xml_element->get_name( ).
namespace = xml_element->get_namespace_uri( ).
ws_header->set_request_header(
name = name
namespace = namespace
dom = xml_element ).
xml_element ?= xml_element->get_next( ).
endwhile.
So, I added to logic to get and then set all childeren, and this was the mistake. This is what caused "XML Parse Error". UsernameToken had already all info with user name and password. Once I removed the extra logic to get all 4 elements, the client proxy began working.
Regards,
Alex -
XML Transformation error (ABAP -- XML)
Hi,
I'm getting the foll. error while doing a XML Transformation, Can anyone help me in this regard..
<FIN_WT>56.0</FIN_WT>
<FIN_WT_UNIT>KG</FIN_WT_UNIT>
<ZZQMNUM />
<ZZHOLD />
<ZZDUMATNR
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
The following tags were not closed: asx:abap, asx:values, OUTPUT, item. Error processing resource 'file:///C:/Documents and...
> />
<PSP_NR>U5/0626-HT-193-1-36-344</PSP_NR>
<ZZCRTNAME>ALFI</ZZCRTNAME>
<ZZAPPNAME>ALFI</ZZAPPNAME>
Regards
Jikuare you trying to transform XML to itab?
is the xml well formed one - you can check this by running the xml file in webbrowser, if it doesnt display, then it means the xml is not well formed.
Regards
Raja -
Generating consumer proxy for a webservice generated from a BAPI
Hello gurus,
I'm having some kind of troubles when I try to generate a a consumer proxy for a service that I have created from an existing BAPI.
First of all, I have activated the service in tx SICF, I've assigned an endpoint from the Tx SOAMANAGER, and I can check the
correct work of the webservice from the wsnavigator, but the developerst still can't use it from the visual studio.
I was browsing help.sap.com and I found that I need to generate a consumer proxy and this must be linked with a logical port.
So I was trying to generate the consumer proxy, but I can't do it because I can't find the service in the Tx SE80.
How can I generate the consumer proxy?
Best regards.
Juanfra.Sorry, but I was confused because what I had to do was generate a consumer proxy fro the user that will use the webservice.
Best regards
Juanfra -
I have created a custom XML Transformer using the SAP Library article:
http://help.sap.com/saphelp_nw04/helpdata/en/e1/98e14110340b7fe10000000a155106/frameset.htm
I created the project and uploaded the PAR file but when I try to create an XML iView I get to the part where I enter the URL and when I click "Next" I get the following error:
Caused by: com.sapportals.portal.prt.core.broker.PortalApplicationNotFoundException: Could not find portal application com.sap.portal.EmptyTransformersProvider...
In the PAR Structure section it says - The Par File must have the following folder structure:
dist->PORTAL-INF->portalapp.xml
dist->PORTAL-INF->xml->XSLLibrary->Transformers (My custom XSL File (stock.xsl) is HERE)
dist->PORTAL-INF->xml->Transfomers.xml
This I have completed however, it also shows two files under the project:
EmptyTransformersProvider.etz
com.sap.portal.EmptyTransformersProvider.par
What are these files and how do I create/add them?
I noted that the name of the Project created here is EmptyTransformersProvider but my project is named ep_sts does this matter?
Also if it matters: this is a DC which I created in NWDS using Enterprise Portal->Portal Application Module.
Lastly I have tested the XSL using Internet explorer and an XML File and it workes fine so I would assume it is not the XSL causing the error.Hello
As i've created my own transform according to the tutorial, it doesnt appear in the list of available transforms either in the xml iview wizard or editor.
Any idea ?
previously I had the same error resolved by naming the project with the right name.
Thanks -
About weblogic proxy call weblogic cluster's servlet error
I use weblogic server 5.1, configruation tow weblogic cluster server and a weblogic
web server, through weblogic web server received browser's http request only,
weblogic cluster server do with jsp and servlet, now html&jsp is ok but servlet
can not do with, if through weblogic cluster server do with jsp and servlet direct,
it's ok.
this is my weblogic.properties section:
weblogic.httpd.register.*.html=\
weblogic.servlet.internal.HttpClusterServlet
weblogic.httpd.initArgs.*.html=\
defaultServers=132.147.35.221:7001|132.147.35.222:7001
weblogic.httpd.register.*.jsp=\
weblogic.servlet.internal.HttpClusterServlet
weblogic.httpd.initArgs.*.jsp=\
defaultServers=132.147.35.221:7001|132.147.35.222:7001
weblogic.httpd.register.*.servlet=\
weblogic.servlet.internal.HttpClusterServlet
weblogic.httpd.initArgs.*.servlet=\
defaultServers=132.147.35.221:7001|132.147.35.222:7001
these are weblogic server as proxy webserver errors:
星期一 八月 20 17:42:38 GMT+08:00 2001:<I> <ServletContext-General>
helloWorld: init
星期一 八月 20 17:42:38 GMT+08:00 2001:<E> <ServletContext-General>
Servlet failed with Exception
java.lang.NullPointerException
at weblogic.servlet.internal.HttpClusterServlet.init(HttpClusterServlet.java:99)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:499)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java,
Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:922)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:886)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
tell me a right configuration please ,thanks.
############### Cluster Proxy Configuration ########################
weblogic.httpd.register.cluster=weblogic.servlet.internal.HttpClusterServlet
weblogic.httpd.initArgs.cluster=defaultServers=132.147.35.221:7001|132.147.3
5.222:7001
weblogic.httpd.defaultServlet=cluster
weblogic.allow.execute.weblogic.clustler=everyone
"chris" <[email protected]> wrote in message
news:[email protected]...
>
> I use weblogic server 5.1, configruation tow weblogic cluster server and
a weblogic
> web server, through weblogic web server received browser's http request
only,
> weblogic cluster server do with jsp and servlet, now html&jsp is ok but
servlet
> can not do with, if through weblogic cluster server do with jsp and
servlet direct,
> it's ok.
>
> this is my weblogic.properties section:
> -----------------------------------------------------------------
> weblogic.httpd.register.*.html=\
> weblogic.servlet.internal.HttpClusterServlet
> weblogic.httpd.initArgs.*.html=\
> defaultServers=132.147.35.221:7001|132.147.35.222:7001
> weblogic.httpd.register.*.jsp=\
> weblogic.servlet.internal.HttpClusterServlet
> weblogic.httpd.initArgs.*.jsp=\
> defaultServers=132.147.35.221:7001|132.147.35.222:7001
> weblogic.httpd.register.*.servlet=\
> weblogic.servlet.internal.HttpClusterServlet
> weblogic.httpd.initArgs.*.servlet=\
> defaultServers=132.147.35.221:7001|132.147.35.222:7001
> -----------------------------------------------------------------
>
>
>
> these are weblogic server as proxy webserver errors:
> -----------------------------------------------------------------
> 星期一 八月 20 17:42:38 GMT+08:00 2001:<I>
<ServletContext-General>
> helloWorld: init
> 星期一 八月 20 17:42:38 GMT+08:00 2001:<E>
<ServletContext-General>
> Servlet failed with Exception
> java.lang.NullPointerException
> at
weblogic.servlet.internal.HttpClusterServlet.init(HttpClusterServlet.java:99
> at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:499)
> at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va,
> Compiled Code)
> at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:442)
> at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:20
0)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:115)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
> at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
> at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
> at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
> -----------------------------------------------------------------
>
> tell me a right configuration please ,thanks.
-
Web Service Call From Consumer Proxy in ABAP: Security Settings
Hello All,
Have a couple of questions:
We are working on a scenario where we have to connect to a web service from ABAP. We have extracted the WSDL, and generated the client proxy, and configured a Logical Port. However, at the time of actual call, we receive an error message "Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message.". We suspect that this is a problem with the SOAP Header, which might be missing some tags, which are required by the Web Service. Problem is, we can not trace the Web Service SOAP Header. We can not see it in SOAMANAGER, or any other transaction as such.
1. Does any body have an idea where to look for the complete SOAP Request, in case of a Consumer Proxy call?
2. After re-configuring the Logical Port in SOAMANAGER, our scenario is now stuck at an error which says: 'SoapFaultCode:1 Security requirements are not satisfied because the security header is not present in the incoming message.'. This is probably happening because the target web service is WSE 3.0 compliant, and hence it is asking for UsernameToken and TimeStamp attributes in SOAP Header. In SOAMANAGER Logical Port configuration, we do not see a placeholder for providing this information. However, in earlier LPCONFIG transaction, there was a field for providing WS Security Profile for Operations. Where does this config lie in SOAMANAGER?
Awaiting Replies.
Thanks and Regards,
SidHi Sid,
The setting username/password in the manual logical port configuration will send the username and password in the http header as basic authentication. That's why you don't see a security header.
To configure usernametoken you have to create the logical port out of a WSDL. This WSDL needs to contain WS-Security Policies . So in the policy section of the WSDL you see an XML element called UsernameToken.
In order to let .Net generate a compatible WSDL you have to configure your WCF Web Service to use a CustomBinding with authentication "UsernameOverTransport". This is a username token in the security header send over SSL. So therefore you need an HTTPSTransport (instead of HTTPTransport) in the binding of your .Net WCF endpoint as well.
For an example of such a WCF service configuration see my comment on http://weblogs.sdn.sap.com/cs/user/view/cs_msg/59671.
Regards,
Mathias -
Detecting transform errors when using org.xml.sax.XMLFilter
I am using javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter to transform xml against a pipeline of stylesheets (See function testPipelineTransform in the example below). The process works okay, excepting that I cannot figure out how to detect errors in the transformation process.
I would like to achieve the same result for the pipeline process as I would for a single transformation using javax.xml.transform.Transformer.setErrorListener. The example below demonstrates how the call to javax.xml.transform.Transformer.setErrorListener does not generate the same result when using org.xml.sax.XMLFilter as it does when using a single transformation.
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXException;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.XMLFilter;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import java.io.*;
public class FilterChain {
static private final String newline = System.getProperty("line.separator");
public static void main(String argv[]) {
System.out.println("Testing pipeline transform");
testPipelineTransform();
System.out.println("Testing single transform");
testXsltSingleTransform();
} // main
static private void testPipelineTransform() {
try {
// Set up the input stream
BufferedInputStream bis = new BufferedInputStream(
new ByteArrayInputStream(getExample().getBytes()));
InputSource input = new InputSource(bis);
// Set up to read the input file
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
// Create the filters
SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory
.newInstance();
XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
XMLFilter filter2 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet2())));
// Wire the output of the reader to filter1
// and the output of filter1 to filter2
filter1.setParent(reader);
filter2.setParent(filter1);
// Set up the output stream
StreamResult result = new StreamResult(System.out);
// Set up the transformer to process the SAX events generated
// by the last filter in the chain
Transformer transformer = stf.newTransformer();
transformer.setErrorListener(new ErrorListener() {
public void error(TransformerException te)
throws TransformerException {
System.out.println("Transform generated Transform Error");
System.out.println(te.getMessage());
public void fatalError(TransformerException te)
throws TransformerException {
System.out
.println("Transform generated Transform Fatal Error");
System.out.println(te.getMessage());
public void warning(TransformerException te)
throws TransformerException {
System.out.println("Transform generated Transform Warning");
System.out.println(te.getMessage());
SAXSource transformSource = new SAXSource(filter2, input);
transformer.transform(transformSource, result);
} catch (TransformerConfigurationException tce) {
// Error generated by the parser
System.out.println("\n** Transformer Factory error");
System.out.println(" " + tce.getMessage());
// Use the contained exception, if any
Throwable x = tce;
if (tce.getException() != null)
x = tce.getException();
x.printStackTrace();
} catch (TransformerException te) {
// Error generated by the parser
System.out.println("\n** Transformation error");
System.out.println(" " + te.getMessage());
// Use the contained exception, if any
Throwable x = te;
if (te.getException() != null)
x = te.getException();
x.printStackTrace();
} catch (SAXException sxe) {
// Error generated by this application
// (or a parser-initialization error)
Exception x = sxe;
if (sxe.getException() != null)
x = sxe.getException();
x.printStackTrace();
} catch (ParserConfigurationException pce) {
// Parser with specified options can't be built
pce.printStackTrace();
static private void testXsltSingleTransform() {
try {
BufferedInputStream bis = new BufferedInputStream(
new ByteArrayInputStream(getExample().getBytes()));
// Set up the output stream
StreamResult result = new StreamResult(System.out);
InputSource input = new InputSource(bis);
TransformerFactory factory = TransformerFactory.newInstance();
Source source = new StreamSource(new StringReader(getStylesheet2()));
Transformer stylesheet = factory.newTransformer(source);
stylesheet.setErrorListener(new ErrorListener() {
public void error(TransformerException te)
throws TransformerException {
System.out.println("Transform generated Transform Error");
System.out.println(te.getMessage());
public void fatalError(TransformerException te)
throws TransformerException {
System.out
.println("Transform generated Transform Fatal Error");
System.out.println(te.getMessage());
public void warning(TransformerException te)
throws TransformerException {
System.out.println("Transform generated Transform Warning");
System.out.println(te.getMessage());
SAXSource transformSource = new SAXSource(input);
stylesheet.transform(transformSource, result);
} catch (Exception exc) {
exc.printStackTrace();
private static String getStylesheet1() {
return
"<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
+ "<xsl:stylesheet" + newline
+ "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
+ "version='1.0'>" + newline
+ "<xsl:output method='xml'/>" + newline
+ "<xsl:template match='/'>" + newline
+ "<DontCareAboutContent></DontCareAboutContent>" + newline
+ "</xsl:template>" + newline
+ "</xsl:stylesheet>" + newline;
private static String getStylesheet2() {
return
"<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
+ "<xsl:stylesheet" + newline
+ "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
+ "version='1.0'>" + newline
+ "<xsl:output method='html'/>" + newline
+ "<xsl:template match='/'>" + newline
+ "<html><body>" + newline
+ "<xsl:message>" + newline
+ "Error Message for the xslt processor" + newline
+ "</xsl:message>" + newline
+ "Dont care about the xslt content," + newline
+ "The only significant part is the xsl:message element" + newline
+ "which results in a error to be handled by the xslt" + newline
+ "processor" + newline
+ "</body></html>" + newline
+ "</xsl:template>" + newline
+ "</xsl:stylesheet>" + newline;
private static String getExample() {
return
"<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
+ "<DontCareAboutContent>" + newline
+ "</DontCareAboutContent>" + newline;
}I made the following change which solves the problem but the sollution is tightly coupled to Xalan. If anyone has any ideas, I would still like to find a way to achieve the desired result using JAXP API's.
XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
if (filter1 instanceof org.apache.xalan.transformer.TrAXFilter) {
((org.apache.xalan.transformer.TrAXFilter)filter1).getTransformer().setErrorListener(...);
... -
Hi All!
I'm having some problems calling a Webservice. I've created a deployable proxy and a client bean and from this bean I've generated a Webservice. When I test this Webservice the actual webservice call is succesfull but I get the following response from the Webservice:
HTTP/1.1 200 OK
Connection: close
Date: Fri, 13 May 2005 10:26:37 GMT
Server: Microsoft-IIS/6.0
P3P: CP="NOI DSP COR ADM DEV PSA PSD HIS OTP OUR IND STA"
X-Powered-By: ASP.NET
X-Powered-By: PHP/4.3.9
Status: 200 OK
Server: PEAR-SOAP 0.8.0RC2-devel
Content-Type: text/xml; charset=UTF-8
Content-Length: 1887
X-Zend-WinEnabler: 1.2.0
<br />
<b>Notice</b>: Undefined property: actor in <b>C:Program FilesZendWinEnablerphppearSOAPServer.php</b> on line <b>318</b><br /> <br />
<b>Notice</b>: Undefined property: mustunderstand in <b>C:Program FilesZendWinEnablerphppearSOAPServer.php</b> on line <b>322</b><br />
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ ....etc"
As you can see there is some HTML code in the response. This HTML code causes problems for the SAP parser as it expects a SOAP:Envelope and not some HTML junk.
I've looked up what the properties <i>mustunderstand</i> and <i>actor</i> do in a SOAP header and they seem to be optional properties. On the Webservice side the SOAP parser unfortunately seem to think these properties are mandatory.
There's probably two ways to solve this problem. The first way is to ask the guys who host this Webservice to change it are their side. The other option is to add these properties to the SOAP header on the SAP side....which brings me to my question: Is there any way to add these two properties to the SOAP header before the deployable proxy calls the Webservice?Hi Arnouid,
as far as I understand your post, the HTML code is the body of the response.
If it is so, it is not a correct SOAP-message. A SOAP header is inside of the envelope and not outside of it.
So, it is not very a big surprise, that the parser don't like this.
Aside from the form of a SOAP-message, it is not even a XML-message, which must begin with <?xml...
tom -
ABAP consumer proxy generation for xMII WSDL's
Hi friends,
I have a question related to generation of consumer proxies in ECC Box. I am trying to create a consumer proxy for xMII WSDL's using URL method. For the first WSDL, I was able to create a service consumer proxy successfullly. It created with the name "XacuteWSSoap". Now, when I am trying to create another consumer proxy, I am always getting the error saying the proxy object already exists. Then, I went to WSDL and compared all of them, they all are having port type as XacuteWSSoap. I believe this is the reason why, it is not allowing me to create a new proxy object for the second WSDL. Does any one know how to overcome this problem?
Thanks in advance,
Regards,
Adithya KHi Gaurav,
I tried both of the ways. Here are the results.
If I delete the proxy and create with new prefix its still the same issue I am having.
And changing the port type seems to work, it allowed me to create a new proxy object. But, again there are few structures which are getting regenerated and overwriting the existing values. Here is the sample WSDL: If you see closely, the complex type "InputParams", Port type name "XacuteWSSoap", Input message name "s0:XacuteSoapIn", Output message name "s0:XacuteSoapOut" are the things which are creating problem for me. If I rename all the above things that I mentioned like port type, input message, etc. Its working for me. But, I dont think this is the correct way of developing these. So, I want to know whether there is any problem with SAP generating the things or I am doing any wrong.
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
- <!-- Types
-->
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
- <s:complexType name="InputParams">
- <s:sequence id="InputSequence">
<s:element maxOccurs="1" minOccurs="0" name="Mode_Read" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="Mode_Write" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="Server" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="TagGUID" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="TagInput" type="s:string" />
</s:sequence>
</s:complexType>
- <s:element name="XacuteRequest">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
</s:sequence>
</s:complexType>
</s:element>
- <s:complexType name="Rowset">
- <s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
</s:sequence>
<s:attribute name="Message" type="s:string" />
</s:complexType>
- <s:complexType name="Row">
- <s:sequence id="RowSequence">
<s:any maxOccurs="132" minOccurs="1" type="s:string" />
</s:sequence>
</s:complexType>
- <s:element name="XacuteResponse">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
- <!-- Messages
-->
- <message name="XacuteSoapIn">
<part element="s0:XacuteRequest" name="parameters" />
</message>
- <message name="XacuteSoapOut">
<part element="s0:XacuteResponse" name="parameters" />
</message>
- <!-- Ports
-->
- <portType name="XacuteWSSoap">
- <operation name="Xacute">
<input message="s0:XacuteSoapIn" />
<output message="s0:XacuteSoapOut" />
</operation>
</portType>
- <!-- Bindings
-->
- <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="Xacute">
<soap:operation soapAction="http://www.sap.com/xMII" style="document" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <!-- Service mapping
-->
- <service name="XacuteWS">
- <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
<soap:address location="http://abc.dx.com:50000/XMII/SOAPRunner/Test%20-%20DoNotDelete/OPC/Trx-OPCTag_Prototype" />
</port>
</service>
</definitions>
Appreciate if you can help.
Thanks,
Adithya K -
ABAP consumer proxy generation for xMII WSDL
Hi friends,
I have a question related to generation of consumer proxies in ECC Box. I am trying to create a consumer proxy for xMII WSDL's using URL method. For the first WSDL, I was able to create a service consumer proxy successfullly. It created with the name "XacuteWSSoap". Now, when I am trying to create another consumer proxy, I am always getting the error saying the proxy object already exists. Then, I went to WSDL and compared all of them, they all are having port type as XacuteWSSoap. I believe this is the reason why, it is not allowing me to create a new proxy object for the second WSDL. Does any one know how to overcome this problem?
Thanks in advance,
Regards,
Adithya KHi Friends,
I would appreciate if anyone can help me with this issue.
Thanks,
Adithya K -
Error in soap header when use webservice consumer proxy
Hi all,
I create a webservice consumer proxy to external server. the webservice provider is .Net and it required a message level security.
The soap message should include a soap header, like this:
<SOAP-ENV:Header>
<m:AuthHeader xmlns:m="http://tempuri.org/">
<m:Username>test1</m:Username>
<m:Password>test</m:Password>
</m:AuthHeader>
</SOAP-ENV:Header>
I have found many information from here. Now I used IF_WSPROTOCOL_WS_HEADER in my program, like this:
REPORT zws_jp_test01.
DATA: lo_zws_jp_co_service_soap TYPE REF TO zws_jp_co_service_soap .
DATA: lo_fault TYPE REF TO cx_ai_system_fault.
DATA: lo_appl_fault TYPE REF TO cx_ai_application_fault.
TRY.
CREATE OBJECT lo_zws_jp_co_service_soap
EXPORTING
logical_port_name = 'ZWS_JP_LP4'.
CATCH cx_ai_system_fault INTO lo_fault.
MESSAGE lo_fault TYPE 'I'.
ENDTRY.
DATA: output TYPE zws_jp_create_job_ad_soap_out .
DATA: input TYPE zws_jp_create_job_ad_soap_in .
DATA: lr_ws_header TYPE REF TO if_wsprotocol_ws_header.
DATA: lv_name TYPE string,
lv_namespace TYPE string.
DATA l_xstring TYPE xstring.
DATA l_string TYPE string.
DATA: ixml TYPE REF TO if_ixml,
xml_document TYPE REF TO if_ixml_document,
xml_root TYPE REF TO if_ixml_element,
xml_element TYPE REF TO if_ixml_element,
xml_node TYPE REF TO if_ixml_node.
lr_ws_header ?= lo_zws_jp_co_service_soap->get_protocol(
if_wsprotocol=>ws_header ).
CONCATENATE
'<SOAP-ENV:Header>'
'<m:AuthHeader xmlns:m="http://tempuri.org/">'
'<m:Username>test1</m:Username>'
'<m:Password>test</m:Password>'
'</m:AuthHeader>'
'</SOAP-ENV:Header>'
INTO l_string.
l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
CALL FUNCTION 'SDIXML_XML_TO_DOM'
EXPORTING
xml = l_xstring
IMPORTING
document = xml_document
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
xml_root = xml_document->get_root_element( ).
xml_element ?= xml_root->get_first_child( ).
WHILE NOT xml_element IS INITIAL.
lv_name = xml_element->get_name( ).
lv_namespace = xml_element->get_namespace_uri( ).
lr_ws_header->set_request_header(
name = lv_name
namespace = lv_namespace
dom = xml_element
must_understand = SPACE
xml_element ?= xml_element->get_next( ).
ENDWHILE.
ENDIF.
input-job_ad-id = 0.
input-job_ad_text-id = 0.
input-job_ad-publish_location = 1.
TRY.
CALL METHOD lo_zws_jp_co_service_soap->create_job_ad
EXPORTING
input = input
IMPORTING
output = output.
CATCH cx_ai_system_fault INTO lo_fault .
MESSAGE lo_fault TYPE 'I'.
CATCH cx_ai_application_fault INTO lo_appl_fault.
MESSAGE lo_appl_fault TYPE 'I'.
WRITE: output-create_job_ad_result-id.
ENDTRY.
But there is error when I run this program. the error is "SoapFaultCode:1"
In tcode ST11, I see this log:
E SOAP_RUNTIME 20100624004837.9280000 : CL_SOAP_RUNTIME_CLIENT
->EXEC_PROCESSING SOAP Fault Exception caught: : SOAP header To
was not understood.
btw the release is 701.
Any one can navigate me to solved the problem?Hi,
I have the same problem as you did before and I posted my code in this [thread|Change SOAP Header: Consuming Webservice;.
In order to to solve your problem, I need to know what is the header that you want to add into the header, what is WSDL, and have you try testing that web service using other tool such as SOAPUI or XMLSPY and what is the result of testing tool?
Regards,
Chaiphon -
Error while activating webservice-consumer-proxy
Hi,
I'm trying to generate a webservice-consumer-proxy from a Salesforce.com-WSDL-File. When trying to activate the proxy I receive an error-message from class CX_ESD_EXCEPTION stating "Beim Aktivieren des Proxys ist ein Fehler aufgetreten." (in english: "Error occured when activating the proxy"). The WSDL-File is SOAP-Version 1.1, Document/Literal.
Thank you very much in advance,
Olli
[SAP Consulting by mindsquare|http://mindsquare.de]I have a similar issue and it says that the reason is one of the exception classes in XML in not derived from either cx_static_check or cx_dynamic_check.
Please let me know if anyone have ideas how to resolve this -
#2170 error calling a webservice from Xcelsius having crossdomain.xml
Hello together,
we are facing a #2170 error indicating we don't have a proper policy file in place when executing a published Xcelsius flash in SAP BI application portal.
We created a WebService that is running an SAP BI System 7.01. The WebService is function module based and was generated following the wizzard. Afterwards we created a Xcelsius app that consumes data from this WebService (via data connection). The resulting flash from Xcelsius was pulished to SAP BI System (portal).
Since there are many entries in the SDN and the internet in general we finally also created an crossdomain.xml file on the BI system which can be accessed and is visible by using "https://<server>/crossdomain.xml".
Now the confusion begins: We exported the flash from Xcelsius to local desktop and executed the corresponding HTML-file. It's working and I can receive/see WebService data (after adjusting flash-security-settings). If we upload both exported files (html and swf) to the BI system (as MIME objects) and execute the html again we are also receiving WebServervice data. So far so good. But if we execute the link from the SAP BI Portal (Xcelsius menu > SAP > Start) we still get the error #2170 indicating we don't have a proper domain policy file in place. But for my understanding we do have. So currently I would assume the error message is somehow misleading.
During all the activities I found out that this error is also raised if the user has insufficient authorization. My user has SAP_ALL authorization for testing purpose.
In general I would say we are not that wrong with our Xcelsius/WebService if we are not coming from BI portal. So my questions are:
1.) Are there any authorization on portal side that might not fit and lead to this error? If insufficient authorizations produces such an error ...
2.) Did we miss any other stuff during our try/fail-operations?
Many thanks in advance for your hints.
SteffenHi Rajat,
This is how the default trace looks
FATAL: Application Servlet failed to notify devices.
Caught java.rmi.RemoteException: Service call exception; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (503) Service Unavailable. The requested URL was:"http://<<server>>:50000/ManagementService/ManagementService?style=document"
at com.om.mws.standaloneproxy.ManagementServiceBindingStub.notifyDevice(ManagementServiceBindingStub.java:1289)
at com.om.mws.standaloneproxy.ManagementServiceBindingStub.notifyDevice(ManagementServiceBindingStub.java:1298)
at com.om.ApplicationServlet$NotifyDevices.run(ApplicationServlet.java:86)
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (503) Service Unavailable. The requested URL was:"http://<<server>>:50000/ManagementService/ManagementService?style=document"
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:980)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1430)
at com.om.mws.standaloneproxy.ManagementServiceBindingStub.notifyDevice(ManagementServiceBindingStub.java:1282)
... 2 more
java.lang.NoSuchMethodError
at java.lang.Thread.destroy(Thread.java:779)
at com.omApplicationServlet$NotifyDevices.run(ApplicationServlet.java:92)
Rgds
Shashank -
XML to Internal table using XSLT by CALL TRANSFORMATION error
Dear experts,
I have to fetch the data from an XML file using XSLT into internal tables. The XML file is very big as following:-
<?xml version="1.0" standalone="yes" ?>
- <Shipment>
<shipmentID>25091203S000778</shipmentID>
<manifestDateTime>2009-12-03T20:16:52.00</manifestDateTime>
<shipmentFacilityNumber>025</shipmentFacilityNumber>
<shipmentFacilityAbbreviation>CHI</shipmentFacilityAbbreviation>
<shipmentFacilityAddress1>810 KIMBERLY DRIVE</shipmentFacilityAddress1>
<shipmentFacilityAddress2 />
<shipmentFacilityCity>CAROL STREAM</shipmentFacilityCity>
<shipmentFacilityState>IL</shipmentFacilityState>
<shipmentFacilityPostalCode>601880000</shipmentFacilityPostalCode>
<shipmentTruckCarrierCode>X150</shipmentTruckCarrierCode>
<shipmentSourceCode>T</shipmentSourceCode>
<userID>CAMPOSG</userID>
- <Delivery>
<primaryCustomerNumber>954371</primaryCustomerNumber>
<primaryCustomerName>MIDWEST OFFICE SUPPLY</primaryCustomerName>
<primaryCustomerAddress1 />
<primaryCustomerAddress2>4765 INDUSTRIAL DR</primaryCustomerAddress2>
<primaryCustomerCity>SPRINGFIELD</primaryCustomerCity>
<primaryCustomerState>IL</primaryCustomerState>
<primaryCustomerPostalCode>627030000</primaryCustomerPostalCode>
<primaryCustomerPhoneNumber>2177535555</primaryCustomerPhoneNumber>
<shuttleStopFacilityNumber />
<billOfLadingNumber>25HZK99</billOfLadingNumber>
<carrierProNumber />
<shipmentTotalCartonCount>6</shipmentTotalCartonCount>
<shipmentTotalWeight>266</shipmentTotalWeight>
- <order>
<orderNumber>25HZK99</orderNumber>
<subOrderNumber />
<dateProcessed>2009-12-03</dateProcessed>
<primaryOrderNumber />
<shipTruckCode>X150</shipTruckCode>
<shipTruckDescription>UDS - ADDISON</shipTruckDescription>
<shipTruckPriorityCode>01</shipTruckPriorityCode>
<shipTruckGroupCode>01</shipTruckGroupCode>
<shipTruckDepartureTime>20.00.00</shipTruckDepartureTime>
<shipTruckDockID>07</shipTruckDockID>
<ldpFacilityAbbreviation />
<shuttleAvailableIndicator>N</shuttleAvailableIndicator>
<shuttleMessageText />
<crossDockFacilityCode />
<crossDockTruckCode />
<crossDockID />
<subsidizedFreightTruckID />
<customerPurchaseOrderNumber>623559</customerPurchaseOrderNumber>
<headerTypeCode>P</headerTypeCode>
<orderTypeID>RG</orderTypeID>
<deliveryTypeID>DS</deliveryTypeID>
<deliveryMethodCode />
<customerBarCode />
<customerReferenceData>25HZK99</customerReferenceData>
<customerReferenceText />
<customerRouteData>ZNED UNTED</customerRouteData>
<customerRouteText>ROUTE</customerRouteText>
<endConsumerPurchaseOrderNumber />
<endConsumerPurchaseOrderText />
<endConsumerName>CHARLESTON TRANS. FACILITY</endConsumerName>
<endConsumerAddress1>HOMEWOOD DT PROGRAM DEPT. 3</endConsumerAddress1>
<endConsumerAddress2>17341 PALMER BLVD.</endConsumerAddress2>
<endConsumerAddress3 />
<endConsumerCity>HOMEWOOD</endConsumerCity>
<endConsumerState>IL</endConsumerState>
<endConsumerPostalCode>60430</endConsumerPostalCode>
<endConsumerCountryCode />
<fillFacilityNumber>025</fillFacilityNumber>
<shpFacilityNumber>025</shpFacilityNumber>
<homeFacilityAbbrCode>STL</homeFacilityAbbrCode>
<homeFacilityNumber>015</homeFacilityNumber>
<multiCartonIndicator>Y</multiCartonIndicator>
<primaryCustomerIndicator>Y</primaryCustomerIndicator>
<shipToCustomerNumber>954371001</shipToCustomerNumber>
<customerCompanyID>01</customerCompanyID>
<customerTruckID>U888</customerTruckID>
<customerTruckDescription>UDS - ADDISON</customerTruckDescription>
<customerTruckDockID>13</customerTruckDockID>
<thirdPartyBillCarrier />
<thirdPartyBillID />
<thirdPartyBillType />
<qualityCheckIndicator>N</qualityCheckIndicator>
<warehouseLaydownID />
<packListPosition>I</packListPosition>
<preferredPackingType>CTN</preferredPackingType>
<preferredPackingMaterial>PAPER</preferredPackingMaterial>
<preferedPackingInstructions />
<totalOrderCartonQty>6</totalOrderCartonQty>
<convertAddressIndicator>N</convertAddressIndicator>
<dealerInstructionIndicator>Y</dealerInstructionIndicator>
<dealerinstructions1>CPO#: 623559</dealerinstructions1>
<dealerinstructions2>ATTN: DANA GRIFFIN</dealerinstructions2>
<dealerinstructions3>INFO: 612</dealerinstructions3>
<dealerinstructions4>ROUTE: ZNED UNTED</dealerinstructions4>
<dealerinstructions5 />
<dealerinstructions6 />
<shippingInstructionsIndicator>N</shippingInstructionsIndicator>
<shippingInstructions1 />
<shippingInstructions2 />
<shippingInstructions3 />
<shippingInstructions4 />
<shippingInstructions5 />
<shippingInstructions6 />
<specialInstructionsIndicator>N</specialInstructionsIndicator>
<specialInstructions1 />
<specialInstructions2 />
<customeContainerDesc />
- <carton>
<deliveryCartonID>253370905995</deliveryCartonID>
<shipIndicator>Y</shipIndicator>
<deliveryPalletID>X150</deliveryPalletID>
<consolidatedDeliveryCartonID />
<scanDateTime>2009-12-03T19:36:12.00</scanDateTime>
<cartonWeight>52</cartonWeight>
<dropShipFlag>1</dropShipFlag>
<carrierTrackingNumber />
<carrierZoneID>0</carrierZoneID>
<codAmount />
<customerPackageAmount />
<declaredValue />
<residentialDeliveryIndicator />
<serviceTypeCode>00</serviceTypeCode>
<ssccCode>006860244400829393</ssccCode>
- <Item>
<shipPrefix>UNV</shipPrefix>
<shipStockNumber>21200</shipStockNumber>
<itemDescription>PAPER XERO/DUP WE LTR 20#</itemDescription>
<orderQuantity>1</orderQuantity>
<originalShipQuantity>1</originalShipQuantity>
<shipQuantity>1</shipQuantity>
<inventoryUnitCode>CT</inventoryUnitCode>
<inventoryWeightQuantity>52.000</inventoryWeightQuantity>
<upcNumber>00000000000000</upcNumber>
<upcRetailCode>087547212004</upcRetailCode>
<hazmatIndicator>N</hazmatIndicator>
<serialRequiredIndicator>N</serialRequiredIndicator>
<dealerMemoPO>S</dealerMemoPO>
<cartonLineNumber>1</cartonLineNumber>
<orderLineNumber>11</orderLineNumber>
<originalOrderPrefix>UNV</originalOrderPrefix>
<originalOrderStockNumber>21200</originalOrderStockNumber>
<reasonCode />
- <Item_Serial>
<serialNumber />
</Item_Serial>
</Item>
</carton>
</order>
</Delivery>
</Shipment>
This is not the complete XML file as it exceeds the 15000 characters and then I cann't post here. So I have deleted much part of it.
The hierarchy is as following: Shipment->Delivery->Order->Carton->Item.
I have created a XSLT for it which is working fine.
But when I execute my report program it gives CX_SY_XSLT_FORMAT_ERROR saying that
Transformation error: Non-canonical structure of element name XML_OUTPUT.Dear experts,
My report program is as following:-
*& Report Z_ASNTRNS
REPORT Z_ASNTRNS.
*& Report Z_ASNTRNS
TYPE-POOLS: abap, ixml.
TABLES: ZASN_SHIPMENT,ZASN_DELIVERY,ZASN_ORDER,ZASN_CARTON,ZASN_ITEM.
*CONSTANTS gs_file TYPE string VALUE 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
This is the structure for the data from the XML file
TYPES: BEGIN OF ts_item,
ZSHIPMENT LIKE ZASN_ITEM-ZSHIPMENT,
VBELN LIKE ZASN_ITEM-VBELN,
ORDER_NUMBER LIKE ZASN_ITEM-ORDER_NUMBER,
CARTON_ID LIKE ZASN_ITEM-CARTON_ID,
ITEM LIKE ZASN_ITEM-ITEM,
CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
AEDAT(8),
AEZET(6),
ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
ORD_QTY(16),
ORIGINAL_SHIP(16),
SHIP_QTY(16),
UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
DEALER_MEMO_PO(5),
ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
STATUS LIKE ZASN_ITEM-STATUS,
END OF ts_item.
TYPES: BEGIN OF ts_carton,
ZSHIPMENT LIKE ZASN_CARTON-ZSHIPMENT,
VBELN LIKE ZASN_CARTON-VBELN,
ORDER_NUMBER LIKE ZASN_CARTON-ORDER_NUMBER,
CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
AEDAT(8),
AEZET(6),
SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
ZZCARTON_WGT(18),
Item type ts_item,
END OF ts_carton.
TYPES: BEGIN OF ts_order,
ZSHIPMENT LIKE ZASN_ORDER-ZSHIPMENT,
VBELN LIKE ZASN_ORDER-VBELN,
ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
AEDAT(8),
AEZET(6),
SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
ORDER_DATE(8),
PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
ANZPK(5),
carton type ts_carton,
END OF ts_order.
TYPES: BEGIN OF ts_delivery,
ZSHIPMENT LIKE ZASN_DELIVERY-ZSHIPMENT,
VBELN LIKE ZASN_DELIVERY-VBELN,
AEDAT(8) TYPE C,
AEZET(6) TYPE C,
PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
CARTON_COUNT(5),
TOTAL_WEIGHT(18),
order type ts_order,
END OF ts_delivery.
TYPES: BEGIN OF ts_shipment,
ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
MANIFEST_DATE_TIME(25),
AEDAT(8) TYPE C,
AEZET(6) TYPE C,
SDATE(8) TYPE C,
STIME(6) TYPE C,
SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
Delivery type ts_delivery,
END OF ts_shipment.
TYPES: BEGIN OF ts_shipment1,
ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
MANIFEST_DATE_TIME(25),
SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
CARTON_COUNT(5),
TOTAL_WEIGHT(18),
ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
ORDER_DATE(8),
PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
ZZCARTON_WGT(18),
ITEM LIKE ZASN_ITEM-ITEM,
CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
ORD_QTY(16),
ORIGINAL_SHIP(16),
SHIP_QTY(16),
UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
DEALER_MEMO_PO(5),
ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
END OF ts_shipment1.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
*Typdefinition für Airplus
*READ THE DOCUMENTATION "LASG_XML_INVOICE_BTM"!!!
VARs beginning with "a_" are ATTRIBUTES
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_ostream TYPE REF TO if_ixml_ostream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xml TYPE REF TO cl_xml_document,
l_xmldata TYPE string.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
DATA: xml_out TYPE string ,
size type i.
DATA: l_xml_x1 TYPE xstring.
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce.
l_itab TYPE TABLE OF string.
DATA: BEGIN OF l_itab occurs 0,
data(256) type c,
end of l_itab.
TYPES : BEGIN OF TY_TEXT,
data(255) type C,
END OF TY_TEXT.
DATA: F_XML TYPE STRING.
DATA : LT_TEXT_OUT type table of TY_TEXT with header line.
tables
DATA: it_shipment TYPE STANDARD TABLE OF ts_shipment,
wa_shipment TYPE ts_shipment.
*Errorvariables
DATA: xslt_err TYPE REF TO cx_xslt_exception,
err_string TYPE string.
PARAMETERS: pa_file TYPE localfile OBLIGATORY
DEFAULT 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
START-OF-SELECTION.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
here we use the CALL TRANSFORMATION method which calls
the XSLT program "z_asnfile"
TRY.
CALL TRANSFORMATION ('Z_ASNFILE')
SOURCE xml LT_TEXT_OUT[]
RESULT xml_output = it_shipment
catch any error, very helpful if the XSLT isn't correct
CATCH cx_xslt_exception INTO xslt_err.
err_string = xslt_err->get_text( ).
WRITE: / 'Transformation error: ', err_string.
EXIT.
ENDTRY." setting a breakpoint to watch the workarea
by the internal table "it_airplus"
break-point.
LOOP AT it_shipment INTO wa_shipment.
ENDLOOP.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Convert binary to text.
CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
EXPORTING
INPUT_LENGTH = 70000
FIRST_LINE = 0
LAST_LINE = 0
APPEND_TO_TABLE = ' '
MIMETYPE = ' '
WRAP_LINES = 'X'
IMPORTING
OUTPUT_LENGTH =
TABLES
BINARY_TAB = l_xml_table
TEXT_TAB = LT_TEXT_OUT
EXCEPTIONS
FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "get_xml_table
Maybe you are looking for
-
Class 6 SD card causes problems / lock ups in Droid 2 Global
My Droid 2 Global phone came with an 8GB SD card and I want to increase it to a 16GB card. I purchased an adata 16GB Class 6 micro SD card. I copied all my data from my 8GB card to my laptop. I then copied the data from the laptop to the 16GB card.
-
Upgrading Multiple Instances of CF8 to CF8.01
I am running CF8 on a Windows 2003 server. I have 13 instances on this server. I need to get all of them to CF8.01 but I don't know how. I ran the coldfusion8-win-updater and selected Mulit-server configuration. When I look at the instance where the
-
Pan Gesture doesn't get triggered
Can Some one explain me why my "TransformGestureEvent.GESTURE_PAN" doesn't get triggered? All the other gesture events are triggered. I find it a bit confusing Oh yeah, i am developing for every platform but testing on a google phone nexus S package
-
Help! I'm trying to upload a video to youtube on the ipad and it's saying cannot publish-do you know why this is happening and how I can get the video to upload? Thanks!
-
Went to open the folder 'app store' and got this: "You can't open the application App Store because it may be damaged or incomplete." How do I fix it???