We help IT Professionals succeed at work.

Parcelforce expressLink integration in vb.net / WSDL help.


I hope that someone is able to help. I am working on integrating our ERP system into the parcelforce system for shipments. I have been sent the wsdl file along with some documentation but I am having problems even working out how to  open a connection.

I don't know if anyone has had any experience with integrating parcelforce?

The testing url is: http://Expresslink-test.parcelforce.net/ws

I have uploaded the .wsdl. I am unable to add either the http://Expresslink-test.parcelforce.net/ws or the http://www.parcelforce.net/ws/ship/v9 as the web reference and had to add the physical file received as the reference.

I am unable to work out how to make the connection and send the request. I can see each of the methods and have been trying to use the "createshipmentrequest"

        Dim o As New ParcelForce.ParcelForceWSDL.CreateShipmentRequest
            'con.BeginOpen(objcallBack, objState)

            o.Authentication = New ParcelForce.ParcelForceWSDL.Authentication()
            o.Authentication.UserName = "test"
            o.Authentication.Password = "test"

How do I send this and receive a reply?

Best Regards,

Watch Question

Software Development Manager/Developer
To add the web service reference you will need to add


as for the rest , you should be able to obtain all you need from parcelforce including all documentation

I can see you can setup a delivery request like :-

        Dim APICall As New pfAPI.CreateShipmentRequest

        APICall.Authentication = New pfAPI.Authentication()
        APICall.Authentication.UserName = "test"
        APICall.Authentication.Password = "test"
        APICall.RequestedShipment.ShipmentType = pfAPI.ShipmentType.DELIVERY
        APICall.RequestedShipment.ContractNumber = "contract number here"
        APICall.RequestedShipment.ServiceCode = "SUP"
        APICall.RequestedShipment.RecipientContact.BusinessName = "Delivery too name"
        APICall.RequestedShipment.RecipientAddress.AddressLine1 = "Address 1"
        APICall.RequestedShipment.RecipientAddress.AddressLine2 = "Address 2"
        APICall.RequestedShipment.RecipientAddress.Country = "Country"
        APICall.RequestedShipment.RecipientAddress.Postcode = "PCODE"
        APICall.RequestedShipment.RecipientAddress.Town = "TOWN"
        APICall.RequestedShipment.ShippingDate = Date.Now
        APICall.RequestedShipment.TotalNumberOfParcels = 1

Open in new window

But I think there may be more to it, and maybe even an addition service reference.
GMGeniusSoftware Development Manager/Developer
I read somewhere

Update: Previously the WSDL was loaded remotely from http://expresslink-test.parcelforce.net/ws/?wsdl however ParcelForce now require the WSDL to be hosted locally. This file is supplied by ParcelForce - See more at: http://www.white-hat-web-design.co.uk/blog/parcelforce-expresslink-api-integration/#sthash.1uvR4sEr.dpuf

So they sent the WSDL to use, unfortunately I don't have a copy to try out
GMGeniusSoftware Development Manager/Developer

Just had another closer look and found this, however I do not have a valid test login to prove it works but I do get a response back with details of invalid login

        Dim csrCall As New pfAPI.CreateShipmentRequest

        csrCall.Authentication = New pfAPI.Authentication()
        csrCall.Authentication.UserName = "test"
        csrCall.Authentication.Password = "test"
        csrCall.RequestedShipment = New pfAPI.RequestedShipment
        csrCall.RequestedShipment.ShipmentType = pfAPI.ShipmentType.DELIVERY
        csrCall.RequestedShipment.ContractNumber = "contract number here"
        csrCall.RequestedShipment.ServiceCode = "SUP"
        csrCall.RequestedShipment.RecipientContact = New pfAPI.Contact
        csrCall.RequestedShipment.RecipientContact.BusinessName = "Delivery too name"
        csrCall.RequestedShipment.RecipientAddress = New pfAPI.Address
        csrCall.RequestedShipment.RecipientAddress.AddressLine1 = "Address 1"
        csrCall.RequestedShipment.RecipientAddress.AddressLine2 = "Address 2"
        csrCall.RequestedShipment.RecipientAddress.Country = "Country"
        csrCall.RequestedShipment.RecipientAddress.Postcode = "PCODE"
        csrCall.RequestedShipment.RecipientAddress.Town = "TOWN"
        csrCall.RequestedShipment.ShippingDate = Date.Now
        csrCall.RequestedShipment.TotalNumberOfParcels = 1

        Dim cmd = New pfAPI.ShipPortTypeClient
        Dim srReply = New pfAPI.CreateShipmentReply

        srReply = cmd.createShipment(csrCall)

Open in new window

Response is

? srReply.Alerts(0)
    Code: "031000001"
    codeField: "031000001"
    Message: "Authentication failed"
    messageField: "Authentication failed"
    PropertyChangedEvent: Nothing
    Type: ERROR {0}
    typeField: ERROR {0}


Got it working. I created another question as I received the pdf stream back. I tried to save this in an empty file named as .pdf but it won't open. Thanks for the help.

Best regards