Detect XML attribute xsi:nil and apply null value
I am using a SOAP Execute to retrieve information from an API. The payload is being converted to JSON. The problem is any field that is null returns with an attribute of @xsi:nil:“true”. This is just an example subset. There are actually more than 10 fields returning like this. [ { “ns2:communityCodeDesc”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:countyCodeDesc”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:dateCreated”: “2023-05-16T11:49:32.010-04:00”, “ns2:dateObsoleted”: { “@xmlns:xsi”: “http://www.w3.org/2001/XMLSchema-instance”, “@xsi:nil”: “true” }, “ns2:familyRSN”: “1250” } ] I need this to be in a more standard JSON form like this… [ { “communityCodeDesc”: null, “countyCodeDesc”: null, “dateCreated”: “2023-05-16T11:49:32.010-04:00”, “dateObsoleted”: null, “familyRSN”: “1250” } ] So I need the xsi: construct converted to null and the namespace identifier dropped. Any help would be appreciated.Solved7.2KViews0likes4CommentsSOAP API Passing credentails to XML envelop
I’m working on an integration with Clarity( Broadcom) - using a soap execute to import data from a Query. In the soap envelope – I need to pass Username and Passoword for authentication . How can I pass credentials securely from account ( basic OAUTH)? It is not taking parameters like account.Username and account.passoword ? <soapenv:Envelope xmlns:obj="http://www.niku.com/xog" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <Auth> <Username>account.username</Username> <Password>account.password</Password> </Auth> </soapenv:Header> <soapenv:Body> <Query xmlns="http://www.niku.com/xog/Query"> <Code>test_delete</Code> </Query> </soapenv:Body> </soapenv:Envelope>1.6KViews0likes0CommentsDownloading a base64 zip file using SOAP
Hi All, I am trying to use SOAP call to download a zip file. However, I cannot download and get the file I need correctly. Here is a screenshot of my pipeline. I took out the $content, which contains a string that is (at least looks like) base64 encoded data. The “Content-Type” is null and “Content-Transfer-Encoding” is “binary”. Then no matter how I decode this string, whether by using Base64.decode() or Base64.decodeAsBinary(), I cannot get the zip file I need. If I use Base64.decode($content), I get something like I can see my file name within a bunch of words that I cannot read. And I think I should not use Base64.decodeAsBinary(). Could someone please tell me what is the correct way to download this zip? Thanks in advance!Solved11KViews0likes10CommentsExecuting different SOAP request's based on input field value
Hello, I have to design a pipe line which is based on SOAP request. I have the wsdl. This is my first SOAP pipeline I have few queries. The SOAP Execute snap has three fields Service Name 2) Endpoint . 3) Operation. What values I have to give here, I checked the document but its not clear to me. The wsdl file I have has ‘ExecuteApplication’ endpoint or method. I need to execute this with request payload when the input filed $Action equal to “directory”. I designed a pipe line like this Here Json parser takes the input and Mapper will prepare the payload for SOAP executor. But this pipeline throwing error. “message”: “HTTP Code: 400 Status: POST to pipeline that does not have an unlinked input view Errors: None” Pls suggest how to execute this SOAP request . thanks arun8.7KViews0likes10CommentsPassing Array data into SOAP envelope
Can anyone suggest how I can pass an array of numbers into a SOAP envelope? I need to make a SOAP API call with a list of phone numbers, as in the below example: Using the Customize Envelope editor of SOAP Execute snap I have successfully configured the XML for a single number as: However the idea is to make one SOAP call with many numbers rather than making many calls for one number at a time. I don’t know how I can pass a list of numbers so that it populates the ‘<Number>’ element multiple times. Never done anything extensive with XML so not sure if I need to do something with XML Formatter/XML Generator snaps then merge the content into the Customize Envelope definition? Or create the list as a string then pass it in? Any advice would be greatly appreciated.6.7KViews0likes2CommentsSOAP Execute has no output
Following the documentation and tutorial (Youtube): https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1437963/SOAP+Execute I am not able to view the output (small green box at the right of SOAP Execute) of the SOAP call. I followed all of the steps precisely. There is no ‘Execute During Preview option’ also (Youtube video is 2018). I have tested all the methods in SOAPUI before beginning integration work with Oracle Peoplesoft. How can I at least get output from the SOAP Execute snap?Solved4.7KViews0likes6CommentsSOAP Execute with MTOM fails with Snaplogic but same envelope works with SoapUI
I am using the following envelope in a SOAP execute snap to transfer a file using MTOM and it is failing but the same envelope in SoapUI works (only difference is that in snaplogic I use a variable to pass the filename): <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM"> <soapenv:Header/> <soapenv:Body> <ucm:GenericRequest webKey="cs"> <ucm:Service IdcService="CHECKIN_UNIVERSAL"> <ucm:Document> <ucm:Field name="dDocTitle">Department Load File</ucm:Field> <ucm:Field name="dDocType">Document</ucm:Field> <ucm:Field name="dDocAuthor">[sakthisundarajan.rajaram@drivestream.com</ucm:Field](mailto:sakthisundarajan.rajaram@drivestream.com%3c/ucm:Field)> <ucm:Field name="dSecurityGroup">FAFusionImportExport</ucm:Field> <ucm:Field name="dDocAccount">hcm$/dataloader$/import$</ucm:Field> <ucm:Field name="primaryFile">$filename1</ucm:Field> <ucm:File name="primaryFile" href="$filename1"> <ucm:Contents>cid:$filename1</ucm:Contents> </ucm:File> </ucm:Document> </ucm:Service> </ucm:GenericRequest> </soapenv:Body> </soapenv:Envelope>3.6KViews0likes3CommentsSOAP Execute Failing in Processing the Response
Hi There, I am getting this error while executing my SOAP snap “com.snaplogic.snap.api.SnapDataException: An exception occurred while executing the SOAP request at com.snaplogic.snap.api.soap.DefaultSoapResponseProcessor.processException” While I see that in pipeline execution statistics, that Data is received from the web service, but going to error. Please advise. I attaching the full stack trace - com.snaplogic.snap.api.SnapDataException: An exception occurred while executing the SOAP request at com.snaplogic.snap.api.soap.DefaultSoapResponseProcessor.processException(DefaultSoapResponseProcessor.java:408) at com.snaplogic.snap.api.soap.SoapExecutor.executeCXF(SoapExecutor.java:259) at com.snaplogic.snap.api.soap.SoapExecutor.execute(SoapExecutor.java:202) at com.snaplogic.snaps.soap.SoapExecute.invokeSoapRequest(SoapExecute.java:894) at com.snaplogic.snaps.soap.SoapExecute.process(SoapExecute.java:795) at com.snaplogic.snap.api.ExecutionUtil.process(ExecutionUtil.java:106) at com.snaplogic.snap.api.ExecutionUtil.executeForDocument(ExecutionUtil.java:118) at com.snaplogic.snap.api.ExecutionUtil.execute(ExecutionUtil.java:81) at com.snaplogic.snap.api.SimpleSnap.execute(SimpleSnap.java:70) at com.snaplogic.cc.snap.common.SnapRunnableImpl.executeSnap(SnapRunnableImpl.java:768) at com.snaplogic.cc.snap.common.SnapRunnableImpl.execute(SnapRunnableImpl.java:550) at com.snaplogic.cc.snap.common.SnapRunnableImpl.doRun(SnapRunnableImpl.java:834) at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:400) at com.snaplogic.cc.snap.common.SnapRunnableImpl.call(SnapRunnableImpl.java:116) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.github.rholder.retry.RetryException: Retrying failed to complete successfully after 3 attempts. at com.github.rholder.retry.Retryer.call(Retryer.java:174) at com.snaplogic.snap.api.soap.SoapExecutor.executeCXF(SoapExecutor.java:257) … 18 more Caused by: javax.xml.ws.soap.SOAPFaultException: Internal Error at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:290) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:334) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:246) at com.snaplogic.snap.api.soap.InvocationServiceImpl.execCall(InvocationServiceImpl.java:389) at com.snaplogic.snap.api.soap.InvocationServiceImpl.call(InvocationServiceImpl.java:323) at com.snaplogic.snap.api.soap.SoapExecutor.soapExecuteAndProcessResponse(SoapExecutor.java:338) at com.snaplogic.snap.api.soap.SoapExecutor.lambda$executeCXF$0(SoapExecutor.java:223) at com.snaplogic.snap.api.soap.SoapExecutor$$Lambda$324/1225503917.call(Unknown Source) at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) at com.github.rholder.retry.Retryer.call(Retryer.java:160) … 19 more Caused by: org.apache.cxf.binding.soap.SoapFault: Internal Error at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:113) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:849) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1642) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1317) at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream.close(AsyncHTTPConduit.java:385) at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223) at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335) at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:370) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:327) … 27 more Reason: Retrying failed to complete successfully after 3 attempts. Resolution: Verify the input data is correct3.3KViews0likes1CommentSOAP UI vs SOAP Execute snap
Hi Team , my vendor provided webservices is connecting good with SOAP UI and returns the proper output. I am not able to get it using soap execute snap. below is the RAW XML. POST https://devwebservices.purolator.com/EWS/V1/Tracking/TrackingService.asmx HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: text/xml;charset=UTF-8 SOAPAction: “http://purolator.com/pws/service/v1/TrackPackagesByPin” Username: b68102d4a6cb4acbad7c00df42ea60de password: JZE$9Gi3 Content-Length: 787 Host: devwebservices.purolator.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Authorization: Basic YjY4MTAyZDRhNmNiNGFjYmFkN2MwMGRmNDJlYTYwZGU6SlpFJDlHaTM= <soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:v1=“http://purolator.com/pws/datatypes/v1”> soapenv:Header v1:RequestContext v1:Version1.2</v1:Version> v1:Languageen</v1:Language> v1:GroupID11</v1:GroupID> v1:RequestReferenceUserRef</v1:RequestReference> v1:UserToken</v1:UserToken> </v1:RequestContext> </soapenv:Header> soapenv:Body v1:TrackPackagesByPinRequest v1:PINs v1:PIN v1:Value329014146438</v1:Value> </v1:PIN> </v1:PINs> </v1:TrackPackagesByPinRequest> </soapenv:Body> </soapenv:Envelope>2.2KViews0likes0Comments