SendLetterResult : -3150

General error..doesn't really help me get it working! :P

Any ideas on what this is and how I can figure out how to fix it?
Here is a copy of the soap message being sent.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s1="PostalMethods/AbstractTypes" xmlns:tns="PostalMethods" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <tns:SendLetter>
      <Username xsi:type="s:string">ryandetzel</Username>
      <Password xsi:type="s:string">******</Password>
      <MyDescription xsi:type="s:string">description for test 2</MyDescription>
      <FileExtension xsi:type="s:string">html</FileExtension>
      <FileBinaryData xsi:type="s:base64Binary">UENGR...FvPQo=</FileBinaryData>
    </tns:SendLetter>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Comments

Ryan, Can you post the code

Ryan,

Can you post the code you were using when this occurred?

Hi Ryan, 1. You are right

Hi Ryan,

1. You are right about the general error code not helping. We've developed our Web Service to provide detailed error descriptions but it seems not handle all cases yet. We've developed a new version of the Web Service which handles all possible cases we know of. It completed testing this morning and we will make an emergency upgrade tomorrow early morning.

2. Using the current Web Service version, it seems that the only reason to get the general error code is when some of the properties of the request are empty or do not exist. In case you are using python, a very skilled programmer had a similar problem and he told me that SOAP.py isn't sophisticated enough to interpret XMLSchema. He uses the Zolera SOAP Infrastructure (ZSI, http://pywebsvcs.sourceforge.net/) with no problem. Please let me know if this is your case and I could ask him to provide additional information.

I'm using Perl, the message

I'm using Perl, the message that is being sent appears to be correct..the only thing I can think of is it's not handling the base64 message correctly.

use strict;
use warnings;
use SOAP::Lite +trace => 'debug';;
use MIME::Base64;
use Data::Dumper;
 
open FILE,"PostalMethodsPopulated.html";
my $file = join("\n",<FILE>);
close FILE;
 
$file = encode_base64($file);
 
$SOAP::Constants::PREFIX_ENV = 'SOAP-ENV';  ## Bug in Soap::Lite
 
my $service = SOAP::Lite->service('http://api.postalmethods.com/PostalWS.asmx?WSDL');
my $result = $service->SendLetter('ryandetzel','******','description for test 2','html',$file);
 
print Dumper($result);
 
1;

Hi! This worked for me (.net

Hi!

This worked for me (.net webservices are a little picky about their namespaces):

my $soap = SOAP::Lite
    -> uri('PostalMethods')
    -> on_action( sub { join '/', 'PostalMethods', $_[1] } )
    -> proxy('http://api.postalmethods.com/PostalWS.asmx');
 
 
print $soap->SendLetter(
                        SOAP::Data->new(name => 'Username', value => 'username', type => 'xsi:string')->uri('PostalMethods'),
                        SOAP::Data->new(name => 'Password', value => 'password', type => 'xsi:string')->uri('PostalMethods'),
                        SOAP::Data->new(name => 'MyDescription', value => 'aaaaaaaaaa', type => 'xsi:string')->uri('PostalMethods'),
                        SOAP::Data->new(name => 'FileExtension', value => 'html', type => 'xsi:string')->uri('PostalMethods'),
                        SOAP::Data->new(name => 'FileBinaryData', value => $file, type => 'xsi:base64Binary')->uri('PostalMethods')
                        )->result;

Also, I think you'll need to chomp your $file.

Regards,
Mack

On a separate note, it's

On a separate note, it's best to default to using an SSL-secured connection to the PostalMethods Web Service. There's no real performance penalty while the security of your app is greatly enhanced. Here's the SSL endpoint: https://api.postalmethods.com/PostalWS.asmx

Hi, I using the WSDL of

Hi,

I using the WSDL of postal methods for testing puropose using SOAPUI.

I am testing the Send Letter method.

Below is the request I am sending and I am getting a blank response.

ushakiran99
password
Test
DOC
Cid

Can you please let me know what could have casued this issue?

Also, I would like get some guidelines on how to pass binary data in the request message for testing SendLetterAndAddress.

Below is the request message I am trying to send.

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SendLetterAndAddress xmlns="PostalMethods">
      <Username>string</Username>
      <Password>string</Password>
      <MyDescription>string</MyDescription>
      <FileExtension>string</FileExtension>
      <FileBinaryData>base64Binary</FileBinaryData>
      <AttentionLine1>string</AttentionLine1>
      <AttentionLine2>string</AttentionLine2>
      <AttentionLine3>string</AttentionLine3>
      <Company>string</Company>
      <Address1>string</Address1>
      <Address2>string</Address2>
      <City>string</City>
      <State>string</State>
      <PostalCode>string</PostalCode>
      <Country>string</Country>
    </SendLetterAndAddress>
  </soap:Body>
</soap:Envelope>

There seems to be a problem

There seems to be a problem in SOAPUI version 2.5 when sending SOAP requests containing binary attachments.

The best workaround at the moment is to convert your document to Base64 using a free online converter, such as: http://www.motobit.com/util/base64-decoder-encoder.asp and edit the SOAPUI request using the FORM or XML tabs, pasting the encoded string between the appropriate tags - <pos:FileBinaryData>base64 Binary String</pos:FileBinaryData>

Please note, the problem

Please note, the problem seems to be solved in SOAPUI version 2.5.2, which is currently in BETA.
http://www.eviware.com/content/view/82/57/