Web Services - Service
1 Module Overview
General information about the NetBaron-Web Services interface is provided in a separate document, available from NetBaron support upon request. This document only describes the Batch selling bill Web Services module, which enables access to NetBaron's Customer Register from external services.
The module is used to retrieve data from service works and to update service work. The interfaces do not support multiple currencies; only EUR is supported.
Error handling must be integrated into the interfaces in case of connection interruptions
1.1 Usage Examples
Retrieve service work using a given work order number
Retrieve service work based on product number and serial number
Add / update service work
Features for extra fees
Customer targeting based on external customer ID
Create a new service work using a customer-specific number series
1.2 Customer targeting based on external customer ID (Available for extra fee)
The feature is available when creating new service work using the PUT-method. It is used when synchronizing customer records between the external system and NetBaron. In the NetBaron customer register, customers must have an external ID that matches the customer ID in the external system.
In the PUT-method, the InvoiceDetails/CustomerReferenceIdentifier element is used to provide the external customer ID. If a customer with a matching external ID is found in the NetBaron customer register, that customer will be set as the client for the created service work.
If the customer specified in the incoming data is not found in the register, a new customer will be created. Existing customer data cannot be updated.
1.3 Creating new service work by using a customer-specific number series (Available for extra fee)
This feature can be used when multiple number series are enabled in Service-app, and a specific series needs to be selected based on the client, when creating new service work using the PUT method.
Customer-specific number series can be configured in Service application settings under the 'Number Series' tab. Each customer can be assigned only 1 number series.
Customer targeting is performed based on the external customer ID (see Chapter 1.2). "If a number series is assigned to the customer, the work order number for the new service task will be taken from that number series. If no number series is assigned to the customer, an external number series will be used for creating the service task.
2 Technical information
2.1 Service information
Address: | If an additional parallel interface has been enabled, the interface number must be specified along with the address to ensure the interface is called from the correct address. Otherwise, authentication will fail. For example: https://server/ws/service2 |
Authentication: | Organization and the organization-specific Web Services password |
The character set used: | UTF-8 |
Available methods: | GET / PUT /POST |
Type of request: | Object |
Type of response: | Object |
2.2 Request content (GET)
Element | Type | Use | Default | Defitinion | Mandatory |
GetServiceCompanyPartyDetails | boolean | Control message | FALSE | Service company information | |
GetWorkerPartyDetails | boolean | Control message | FALSE | Worker details | |
GetOrderPartyDetails | boolean | Control message | FALSE | Orderer details | |
GetCustomerPartyDetails | boolean | Control message | FALSE | Customer details | |
GetInvoicePartyDetails | boolean | Control message | FALSE | Payer / Invoicing address details | |
GetDeliveryPartyDetails | boolean | Control message | FALSE | Customer details | |
GetDeliveryDetails | boolean | Control message | FALSE | Customer details | |
GetInvoiceDetails | boolean | Control message | FALSE | Invoice details / Billing information | |
GetWorkDetails | boolean | Control message | FALSE | Work details | |
GetDateDetails | boolean | Control message | FALSE | Date information | |
GetWorkFreeText | boolean | Control message | FALSE | Work free text | |
GetWorkMaterialRows | boolean | Control message | FALSE | Material rows | |
GetWorkReadOutRows | boolean | Control message | FALSE | Meter read out rows | |
GetProductDetails | boolean | Control message | FALSE | Product information | |
GetWarrantyDetails | boolean | Control message | FALSE | Product information | |
GetCostEstimateDetails | boolean | Control message | FALSE | Cost estimate information | |
GetSwapDetails | boolean | Control message | FALSE | Replacement unit information | |
GetWorkingTimeDetails | boolean | Control message | FALSE | Work time details | |
GetProductFreeText | boolean | Control message | FALSE | Free text related to service work | |
GetProductAttachments | boolean | Control message | FALSE | Product attachments | |
GetDescriptions | boolean | Control message | FALSE | Service work description | |
GetWorkAdditionalData | boolean | Control message | FALSE | Additional info related to service work | |
GetWorkAttachments | boolean | Control message | FALSE | Additional info related to service work | |
GetUrgencyCodeTable | boolean | Control message | FALSE | Urgency categories | |
WorkIdentifierIds | object | Search criteria | Service work to be retrieved | X1 * | |
WorkNumberIdentifiers | object | Search criteria | Service work to be retrieved | X2 * | |
WorkProductNumberIdentifiers | object | Search criteria | Service work to be retrieved | X3 * | |
UserLogin | object | Search criteria | Service work to be retrieved | X4 * | |
SearchByStatus | object | Filtering | Filtering search by status | ||
SearchByWorker | object | Filtering | Filtering search by worker | ||
WorkNumberIdentifiersCoded | boolean | Control message | FALSE | If TRUE, the WorkNumberIdentifier parameter is processed as encrypted |
* X1, X2, X3, X4 | One of these search conditions must be met. |
2.2.1 WorkIdentifierIds-object
Element | Type | Use | Definition | Mandatory |
Work(x) | object | Search criteria | WorkIdentifierIds counter, for example Work1, Work2, etc. | YES |
2.2.1.1 Work(x)-object
Element | Type | Use | Definition | Mandatory |
WorkIdentifierId | int(11) | Search criteria | Work identifier information | YES |
2.2.2 WorkNumberIdentifiers-object
Element | Type | Use | Definition | Mandatory |
Work(x) | object | Search criteria | WorkIdentifierIds counter, for example Work1, Work2, etc. | YES |
2.2.2.1 Work(x)-object
Element | Type | Use | Definition | Mandatory |
WorkNumberIdentifier | string | Search criteria | Work number of the work to be retrieved (utf-8) | YES |
SerialNumberIdentifier1 | string | Search criteria | Serial number 1 of the work to be retrieved (utf-8) | *X1 |
SerialNumberIdentifier2 | string | Search criteria | Serial number 2 of the work to be retrieved (utf-8) | |
SerialNumberIdentifier3 | string | Search criteria | Serial number 3 of the work to be retrieved (utf-8) |
SerialNumberIdentifierid1..3 | Can be used for search refinement, similar to the WorkProductNumberIdentifier search criterion. |
Search by serial Number only *X1 | If no other search criteria (WorknumberIdentifier, WorkProductNumberIdentifiers, WorkIdentifierIds) are used, and only WorkNumberIdentifiers → SerialNumberIdentifier1 is provided, the search will be performed by using only the given serial number. The search will be conducted on the service job fields SerialNumber1, SerialNumber2, and SerialNumber3, and it will return all jobs where one of the mentioned serial numbers matches exactly the search criterion. |
2.2.3 WorkProductNumberIdentifiers-object
Element | Type | Use | Definition | Mandatory |
Work(x) | object | Search criteria | WorkProductNumberIdentifiers laskuri Esim. Work1, Work2 jne. | YES |
2.2.3.1 Work(x)-object
Element | Type | Use | Definition | Mandatory |
WorkProductNumberIdentifier | string (utf-8) | Search criteria | Product number of the work to be retrieved | YES |
SerialNumberIdentifier1 | string (utf-8) | Search criteria | Serial number 1 of the work to be retrieved | X1 |
SerialNumberIdentifier2 | string (utf-8) | Search criteria | Serial number 2 of the work to be retrieved | X2 |
SerialNumberIdentifier3 | string (utf-8) | Search criteria | Serial number 3 of the work to be retrieved | X3 |
X1, X2, X3 | One of these search conditions must be met. |
2.2.4 UserLogin-object
Element | Type | Use | Definition | Mandatory |
UserLoginMethod | int | Search method | Search method | YES |
ExtraIdentifier | string (utf-8) | Customer identifier | Customer identifier. In the customer register on the Basic info 2 -tab, the Extraidentifier-field | YES |
CustomerIdentifierId | string (utf-8) | Search criteria | Customer specific ID | If UserLogin-Method=1 |
PartyIdentifier | string (utf-8) | Search criteria | Business ID | If UserLogin-Method=2 |
SocialSecurityNumber | string (utf-8) | Search criteria | Social security number | If UserLoginMethod=3 |
EmailAddressIdentifier | string (utf-8) | Search criteria | E-mail address | If UserLoginMethod=4 tai 2 |
Name | string (utf-8) | Search criteria | Contact person’s name | If UserLoginMethod=3 tai 4 |
UserLoginMethod=1 | Search by CustomerIdentifierId and ExtraIdentifier. |
UserLoginMethod=2 | Search by PartyIdentifier, EmailAddressIdentifier, and ExtraIdentifier. |
UserLoginMethod=3 | Search by SocialSecurityNumber, Name, and ExtraIdentifier. |
UserLoginMethod=4 | Search by CustomerIdentifierId, Name, and ExtraIdentifier. |
2.2.5 SearchByStatus-object
Element | Type | Use | Default | Definition |
Ready | boolean | Search | Completed work | |
NotReady | boolean | Search | Uncompleted work | |
ReadyDayLimit | int | Filter | 30 | Date filter for completed works. How many days old works are retrieved |
NotReadyDayLimit | int | Filter | Date filter for uncompleted works. How many days old work will be retrieved. |
SearchByStatus -object | Use to search without any additional search criteria. |
Ready = true and/or NotReady = true | Fetch all completed and/or uncompleted works. |
SearchByStatus object is not defined | The search is not filtered by status. If any value is defined, the others automatically receive the value: false. |
2.2.6 SearchByWorker-object
Element | Type | Use | Definition |
WorkerName | string | Search | Worker’s name |
WorkerNumber | int | Search | Worker’s personal ID (personnel register ID) |
SeachByWorker-object can be used to search without any other search criteria.
2.3 Content of the response (GET)
Element | Type | Definition |
ResponseStatus | int (0/1) | 0 = Error 1 = OK, Operation completed successfully |
ResponseMessage | string (utf-8) | Additional description of events, errors, etc. |
NumberOfWorks | int | Number of works found |
Works | array | Found works |
2.3.1 Works-table
Element | Type | Definition |
WorkIdentifierId | int(11) | Individual work identifier |
WorkNumberIdentifier | string (utf-8) | Work number |
WorkType | string (utf-8) | Work type |
UrgencyId | int(11) | Work urgency class |
Opener | string (utf-8) | Application where the work was opened |
WorkStatusDetails | object | Work status information |
ServiceCompanyPartyDetails | object | Service company details |
WorkerPartyDetails | string (utf-8) | Worker details |
WorkerCommunicationDetails | object | Contact details |
InvoicePartyDetails | object | Payer / Invoicing address details |
InvoiceContactPersonName | string (utf-8) | Contact person |
InvoiceCommunicationDetails | object | Contact details |
OrderPartyDetails | object | Orderer details |
OrderContactPersonName | String (utf-8) | Contact person |
OrderCommunicationDetails | object | Contact details |
DeliveryPartyDetails | object | Delivery address |
DeliveryContactPersonName | string (utf-8) | Contact person |
DeliveryCommunicationDetails | object | Contact details |
CustomerPartyDetails | object | Customer details |
CustomerContactPersonName | string (utf-8) | Contact person |
CustomerCommunicationDetails | object | Contact details |
DeliveryDetails | object | Delivery address |
InvoiceDetails | object | Invoice details / Billing information |
WorkDetails | object | Work details |
WorkFreeText | Array(0..n) | Additional info: Extra fields from the service work “Contact details” > “Additional info” -tab |
WorkAdditionalData | object | Other data |
Attachments | Array(0..n) | Attachments |
WorkMaterialRows | Array(0..n) | Material rows |
WorkReadOutRows | Array(0..n) | Meter read out rows |
UrgencyCodeTable | Array(0..n) | Work Urgency class |
2.3.1.1 WorkStatusDetails-object
Element | Type | Definition |
WorkStatusCode | string (utf-8) | Work status |
PaymentStatusCode | string (utf-8) | Invoicing status |
2.3.1.2 ServiceCompanyPartyDetails-object
Element | Type | Definition |
ServiceCompanyPartyIdentifierId | int(11) | Internal identifier |
ServiceCompanyPartyIdentifierField | string (utf-8) | Internal identifier |
ServiceCompanyOrganisationName | array(1-2) | Company |
ServiceCompanyPostalAddressDetails | object | Address details |
2.3.1.2.1 ServiceCompanyOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Company |
2.3.1.2.2 ServiceCompanyPostalAddressDetails-object
Element | Type | Definition |
ServiceCompanyStreetName | array(0...2) | Street addresses |
ServiceCompanyTownName | string (utf-8) | Town / post office |
ServiceCompanyPostCodeIdentifier | string (utf-8) | Postal code |
2.3.1.2.2.1. ServiceCompanyStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.3.1.3 WorkerPartyDetails-object
Element | Type | Definition |
WorkerName | string (utf-8) | Worker’s name |
2.3.1.4 WorkerCommunicationDetails-object
Element | Type | Definition |
WorkerPhoneNumberIdentifier | string (utf-8) | Phone number |
WorkerGsmNumberIdentifier | string (utf-8) | Mobile number |
WorkerEmailaddressIdentifier | string (utf-8) | E-mail address |
2.3.1.5 InvoicePartyDetails-object
Element | Type | Definition |
InvoicePartyIdentifierId | int(11) | Internal identifier |
InvoicePartyIdentifierField | string (utf-8) | Internal identifier field |
InvoiceOrganisationName | array(1-2) | Invoiced party |
InvoicePostalAddressDetails | object | Address details |
2.3.1.5.1 InvoiceOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Invoiced party name |
2.3.1.5.2 InvoicePostalAddressDetails-object
Element | Type | Definition |
InvoiceStreetName | array(0...2) | Street addresses |
InvoiceTownName | string (utf-8) | Town / Postal office |
InvoicePostCodeIdentifier | string (utf-8) | Postal code |
2.3.1.5.2.1. InvoiceStreetName-table
Element | Type | Definition |
StreetName | string | Street address |
2.3.1.6 InvoiceCommunicationDetails-object
Element | Type | Definition |
InvoicePhoneNumberIdentifier | string (utf-8) | Phone number |
InvoiceGsmNumberIdentifier | string (utf-8) | Mobile number |
InvoiceEmailaddressIdentifier | string (utf-8) | E-mail address |
2.3.1.7 OrderPartyDetails-object
Element | Type | Definition |
OrderPartyIdentifierId | int(11) | Internal identifier |
OrderPartyIdentifierField | string (utf-8) | Internal identifier field |
OrderOrganisationName | array(1-2) | Orderer details |
OrderPostalAddressDetails | object | Address details |
2.3.1.7.1 OrderOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Orderer’s name |
2.3.1.7.2 OrderPostalAddressDetails-object
Element | Type | Definition |
OrderStreetName | array(0...2) | Street addresses |
OrderTownName | string (utf-8) | Town / Postal office |
OrderPostCodeIdentifier | string (utf-8) | Postal code |
2.3.1.7.2.1. OrderStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.3.1.8 OrderCommunicationDetails-object
Element | Type | Definition |
OrderPhoneNumberIdentifier | string (utf-8) | Phone number |
OrderGsmNumberIdentifier | string (utf-8) | Mobile number |
OrderEmailaddressIdentifier | string (utf-8) | E-mail address |
2.3.1.9 DeliveryPartyDetails-object
Element | Type | Definition |
DeliveryPartyIdentifierId | int(11) | Internal identifier |
DeliveryPartyIdentifierField | string (utf-8) | Internal identifier field |
DeliveryOrganisationName | array(1-2) | Delivery |
DeliveryPostalAddressDetails | object | Address details |
2.3.1.9.1 DeliveryOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Delivery party name |
2.3.1.9.2 DeliveryPostalAddressDetails-object
Element | Type | Definition |
DeliveryStreetName | array(0...2) | Street addresses |
DeliveryTownName | string (utf-8) | Town / Post office |
DeliveryPostCodeIdentifier | string (utf-8) | Postal code |
2.3.1.9.2.1. DeliveryStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.3.1.10 DeliveryCommunicationDetails-object
Element | Type | Definition |
DeliveryPhoneNumberIdentifier | string (utf-8) | Phone number |
DeliveryGsmNumberIdentifier | string (utf-8) | Mobile number |
DeliveryEmailaddressIdentifier | string (utf-8) | E-mail address |
2.3.1.11 CustomerPartyDetails-object
Element | Type | Definition |
CustomerPartyIdentifierId | int(11) | Internal identifier |
CustomerPartyIdentifierField | string (utf-8) | Internal identifier field |
CustomerOrganisationName | array(1-2) | Delivery |
CustomerPostalAddressDetails | object | Address details |
2.3.1.11.1 CustomerOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Delivery party name |
2.3.1.11.2 CustomerPostalAddressDetails-object
Element | Type | Definition |
CustomerStreetName | array(0...2) | Street addresses |
CustomerTownName | string (utf-8) | Town |
CustomerPostCodeIdentifier | string (utf-8) | Postal code |
2.3.1.11.2.1 CustomerStreetName-table
Taulukko Ohessa on esitetty CustomerStreetName-taulukko.
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.3.1.12 CustomerCommunicationDetails-object
Element | Type | Definition |
CustomerPhoneNumberIdentifier | string (utf-8) | Phone number |
CustomerGsmNumberIdentifier | string (utf-8) | Mobile number |
CustomerEmailaddressIdentifier | string (utf-8) | E-mail address |
2.3.1.13 DeliveryDetails-object
Element | Type | Definition |
DeliveryMethodText | string (utf-8) | Delivery method |
DeliveryTermsText | string (utf-8) | Delivery terms |
DeliveryNoteIdentifier | string (utf-8) | Consignment note / Bill of lading |
DeliveryInstruction | string (utf-8) | Delivery instructions |
TransportInstruction | string (utf-8) | Transport instructions |
2.3.1.14 InvoiceDetails-object
Element | Type | Definition |
WorkReferenceIdentifier | string (utf-8) | Service work reference |
CustomerReferenceIdentifier | string (utf-8) | Customer reference |
ProjectReferenceIdentifier | string (utf-8) | Project number |
TotalVatExcludedAmount | double(####,##) | VAT free amount |
TotalVatAmount | double(####,##) | VAT amount |
TotalVatIncludedAmount | double(####,##) | Total including VAT |
AmountCurrencyIdentifier | string(3), (utf-8) | Currency |
NormalProposedAccountIdentifier | string (utf-8) | Customer’s account |
AccountDimensionText | string (utf-8) | Customer cost center |
PaymentTermsDetails | object | Payment terms |
2.3.1.14.1 PaymentTermsDetails-object
Element | Type | Definition |
PaymentTermsFreeText | string (utf-8) | Payment terms |
2.3.1.15 WorkDetails-object
Element | Type | Definition |
ProductDetails | object | Product details |
WarrantyDetails | object | Warranty details |
CostEstimateDetails | object | Cost estimate details |
SwapDetails | object | Replacement unit information |
DateDetails | object | Time details |
WorkingTimeDetails | object | Working time details |
ProductFreeText | array(0...n) | Additional info: Service work product extra fields on the “Repair work” > “Additional info” -tab |
ProductAttachments | object | Product attachments |
Descriptions | object | Work description |
2.3.1.15.1 ProductDetails-object
Element | Type | Definition |
ProductNumber | string (utf-8) | Product number |
Product | string (utf-8) | Product |
ProductGroup | string (utf-8) | Product group |
CompletionYear | string (utf-8) | Year of completion |
SerialNumberIdentifiers | object | Serial numbers |
SystemProductNumber | string (utf-8) | System product number |
SystemSerialNumber | string (utf-8) | System serial number |
2.3.1.15.1.1 SerialNumberIdentifiers-object
Element | Type | Definition |
SerialNumberIdentifier1 | string (utf-8) | Serial number 1 |
SerialNumberIdentifier2 | string (utf-8) | Serial number 2 |
SerialNumberIdentifier3 | string (utf-8) | Serial number 3 |
2.3.1.15.2 WarrantyDetails-object
Element | Type | Definition |
Warrantor | string (utf-8) | Warrantor |
WarrantorWarranty | object | Warrantor warranty |
AgreementNumber | string | Agreement number from Service Product details |
ServiceWarranty | object | Service warranty |
AcquisitionDate | string (utf-8) | Acquisition date |
AcquisitionPlace | string (utf-8) | Acquisition place |
2.3.1.15.2.1 WarrantorWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
WarrantyDate | string (utf-8) | Date of warranty |
2.3.1.15.2.2 ServiceWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
WarrantyDate | string (utf-8) | Date of warranty |
2.3.1.15.3 CostEstimateDetails-object
Element | Type | Definition |
EstimateOfCost | string(1), (utf-8) | Cost estimate: Y / N |
CostLimit | string (utf-8) | Cost limit |
CostAuthorized | string(1), (utf-8) | Cost accepted: Y / N |
CostAuthorizedName | string (utf-8) | The approver / acceptor |
CostAuthorizedDate | date(YYYY-mm-dd) | Accepted: date |
CostAuthorizedTime | time(HH-ii-ss) | Accepted: time |
2.3.1.15.4 SwapDetails-object
Element | Type | Definition |
RemovedProductNumber | string (utf-8) | Product number: Deleted product data |
RemovedProduct | string (utf-8) | Product: Deleted product data |
RemovedCompletionYear | string (utf-8) | Completion year: Deleted product data |
DOA | string(1), (utf-8) | DOA: Deleted product data ( Y / N) |
RemovedSerialNumberIdentifiers | object | Serial numbers: Deleted product data |
2.3.1.15.4.1 RemovedSerialNumberIdentifiers-object
Element | Type | Definition |
SerialNumberIdentifier1 | string (utf-8) | Serial number 1 (Deleted product data) |
SerialNumberIdentifier2 | string (utf-8) | Serial number 2 (Deleted product data) |
SerialNumberIdentifier3 | string (utf-8) | Serial number 3 (Deleted product data) |
2.3.1.15.5 DateDetails-object
Element | Type | Definition |
ReceiveDate | date(YYYY-mm-dd) | Received date |
ReceiveTime | time(HH-ii-ss) | Received time |
AgreedStartDate | date(YYYY-mm-dd) | Agreed start date |
AgreedStartTime | time(HH-ii-ss) | Agreed start time |
AgreedWorkDate | date(YYYY-mm-dd) | Agreed repair date |
AgreedWorkTime | time(HH-ii-ss) | Agreed repair time |
StartDate | date(YYYY-mm-dd) | Repair start date |
StartTime | time(HH-ii-ss) | Repair start time |
EndDate | date(YYYY-mm-dd) | Repair end date |
EndTime | time(HH-ii-ss) | Repair end time |
AgreedDeliveryDate | date(YYYY-mm-dd) | Agreed delivery date |
AgreedDeliveryTime | time(HH-ii-ss) | Agreed delivery time |
DeliveryDate | date(YYYY-mm-dd) | Delivery date |
DeliveryTime | time(HH-ii-ss) | Delivery time |
NotifyDate | date(YYYY-mm-dd) | Notification date |
NotifyTime | time(HH-ii-ss) | Notification time |
CustomerVisitDate | date(YYYY-mm-dd) | Customer visit date |
CustomerVisitTime | time(HH-ii-ss) | Customer visit time |
SlaRealization | string | Actual SLA: 'Not set' / 'Y' / 'N' |
2.3.1.15.6 WorkingTimeDetails-object
Element | Type | Definition |
WorkTime | time(HH-ii) | Working time used |
TravelTime | time(HH-ii) | Travel time spent |
OverTime | string(1), (utf-8) | Overtime |
OverTimeHours | time(HH-ii) | Overtime spent |
AfterBusinessTime | string(1), (utf-8) | Outside working hours |
AfterBusinessTimeHours | time(HH-ii) | Time spent outside working hours |
2.3.1.15.7 ProductFreeText-table
Element | Type | Definition |
ProductFreeTextTitle | string (utf-8) | Custom free text field title |
ProductFreeText | string (utf-8) | Service work product free fields on the “Repair work” > “Additional info” -tab |
2.3.1.15.8 ProductAttachments-object
Taulukko Taulukossa on esitetty ProductAttachments-olio.
Element | Type | Definition |
Attachment(1-5) | object | Attachment |
2.3.1.15.8.1 Attachment(1-5)-object
Element | Type | Definition |
FileName | string (utf-8) | File name |
File | text (base64) | File content |
2.3.1.15.9 Descriptions-object
Element | Type | Definition |
WorkDescription | string (utf-8) | Fault description |
Equipments | string (utf-8) | Accessories |
ShortWorkReport | string (utf-8) | Short repair description |
WorkReport | string (utf-8) | Service work description |
WorkReportToCustomer | string (utf-8) | Service work description to customer |
2.3.1.16 WorkFreeText-object
Element | Type | Definition |
[x] | object | Numbered table with restored extra fields x = 0 …. n |
2.3.1.16.1 [x]-object contents
Element | Type | Definition |
FreeTextTitle | string (utf-8) | Title |
FreeText | string (utf-8) | Value |
2.3.1.17 WorkAdditionalData-object
Element | Type | Definition |
Announcement | string (utf-8) | Notification |
AdditionalData | string (utf-8) | Internal Information |
2.3.1.18 Attachments-table
Element | Type | Definition |
FileName | string (utf-8) | File name |
File | text (base64) | File content |
2.3.1.19 WorkMaterialRows-table
Element | Type | Definition |
WorkMaterialRow | object | Contains WorkMaterialRow-objects. For example: WorkMaterialRow1, WorkMaterialRow2, WorkMaterialRow3 etc. |
2.3.1.19.1 WorkMaterialRow – object
Element | Type | Definition |
RowIdentifier | string (utf-8) | Row indentifier |
ArticleIdentifier | string (utf-8) | Product number |
ArticleGroupIdentifier | string (utf-8) | Product group |
ArticleName | string (utf-8) | Product name |
WarrantyDetails | object | Warranty details |
ArticleInfoUrlText | string (utf-8) | Picture: Picture url |
EanCode | string (utf-8) | GTIN(EAN)-code |
SerialNumberIdentifier | string (utf-8) | Serial number |
OrderedQuantity | double(####) | Ordered quantity |
DeliveredQuantity | double(####) | Delivered quantity |
QuantityUnitCode | string | Unit |
UnitPriceAmount | double(####,#####) | Unit price (VAT 0 VAT free) |
UnitPurchaseAPriceAmount | double(####,#####) | Unit a-purchase price |
UnitPurchaseBPriceAmount | double(####,#####) | Unit b- purchase price |
RowProjectReferenceIdentifier | string (utf-8) | Project number |
RowAccountDimensionText | string (utf-8) | Cost center |
RowDiscountPercent | double(####) | Discount percentage |
RowVatRatePercent | double(####) | VAT Percentage |
RowVatAmount | double(####,##) | VAT amount |
RowVatExcludedAmount | double(####,##) | VAT free amount |
RowAmount | double(####,##) | Total amount including VAT |
AmountCurrencyIdentifier | string(3), (utf-8) | Currency |
RowNormalProposedAccountIdentifier | string (utf-8) | Account |
2.3.1.19.2 WarrantyDetails-object
Element | Type | Definition |
WarrantorWarranty | object | Warrantor warranty |
ServiceWarranty | object | Service warranty |
2.3.1.19.2.1 WarrantorWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
2.3.1.19.2.2 ServiceWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
2.3.1.20 WorkReadOutRows-table
Element | Type | Definition |
ReadOutRowIdentifier | string (utf-8) | Row indentifier |
ArticleIdentifier | string (utf-8) | Product number |
ArticleName | string (utf-8) | Product name |
SerialNumberIdentifier | string (utf-8) | Serial number |
ReadingStartDate | date(YYYY-mm-dd) | Start date |
ReadingStart | double(####) | Initial reading |
ReadingEndDate | date(YYYY-mm-dd) | Ending date |
ReadingEnd | double(####) | Final reading |
ReadingSum | double(####) | Total reading |
QuantityUnitCode | string (utf-8) | Unit |
2.3.1.21 UrgencyCodeTable-object
Element | Type | Definition |
text | string (utf-8) | Title: Defined in the Service Module settings |
color | string (utf-8) | Colour: Defined in the Service Module settings |
2.4 Request content (PUT/POST)
Element | Type | Definition | Default | Mandatory |
Works | object | Contains Work-objects | YES | |
GenerateWorkNumber | boolean | Control message: Create work number Default Value = FALSE | FALSE |
2.4.1 Works object
Element | Type | Definition | Mandatory |
Work(x) | object | Work counter. For example Work1, Work2 etc. | YES |
2.4.1.1 Work(x)-object
Element | Type | Definition | Mandatory |
WorkIdentifierId | string (utf-8) | Work identifier | POST |
WorkType | string (utf-8) | Work type | |
UrgencyId | int(11) | Work urgency classification | |
Opener | string (utf-8) | Application where the work was opened | |
ServiceCompanyPartyDetails | object | Service company details | |
WorkerPartyDetails | object | Worker’s details | |
WorkerCommunicationDetails | object | Worker’s contact details | |
InvoicePartyDetails | object | Payer details | |
InvoiceContactPersonName | string (utf-8) | Payer Contact person | |
InvoiceCommunicationDetails | object | Payer Contact details | |
OrderPartyDetails | object | Orderer details | PUT |
OrderContactPersonName | string (utf-8) | Orderer Contact person | |
OrderCommunicationDetails | object | Orderer Contact details | |
DeliveryPartyDetails | object | Delivery address details | |
DeliveryContactPersonName | string (utf-8) | Delivery Contact person | |
DeliveryCommunicationDetails | object | Delivery Contact details | |
CustomerPartyDetails | object | Customer details | |
CustomerContactPersonName | string (utf-8) | Customer Contact person | |
CustomerCommunicationDetails | object | Customer Contact details | |
DeliveryDetails | object | Delivery details | |
InvoiceDetails | object | Invoice details | |
WorkDetails | object | Work information | PUT |
WorkFreeText | object | Extra fields texts for the service work “Contact details” > “Additional info” -tab | |
Attachments | object | Work attachments | |
WorkMaterialRows | object | Material rows |
2.4.1.2 ServiceCompanyPartyDetails-object
Element | Type | Definition |
ServiceCompanyPartyIdentifierId | int(11) | Internal identifier |
ServiceCompanyPartyIdentifierField | string (utf-8) | Internal identifier field |
ServiceCompanyOrganisationName | array(1-2) | Company |
ServiceCompanyPostalAddressDetails | object | Address details |
2.4.1.2.1 ServiceCompanyOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Company |
2.4.1.2.2 ServiceCompanyPostalAddressDetails-object
Element | Type | Definition |
ServiceCompanyStreetName | array(0...2) | Street addresses |
ServiceCompanyTownName | string (utf-8) | City / Post office |
ServiceCompanyPostCodeIdentifier | string (utf-8) | Postal code |
2.4.1.2.2.1. ServiceCompanyStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.4.1.3 WorkerPartyDetails-object
Element | Type | Definition |
WorkerName | string (utf-8) | Worker’s name |
2.4.1.4 WorkerCommunicationDetails-object
Element | Type | Definition |
WorkerPhoneNumberIdentifier | string (utf-8) | Phone number |
WorkerGsmNumberIdentifier | string (utf-8) | Mobile number |
WorkerEmailaddressIdentifier | string (utf-8) | E-mail address |
2.4.1.5 InvoicePartyDetails-object
Taulukko Taulukossa on esitetty InvoicePartyDetails-olio.
Element | Type | Definition |
InvoicePartyIdentifierId | int(11) | Internal identifier |
InvoicePartyIdentifierField | string (utf-8) | Internal identifier field |
InvoiceOrganisationName | array(1-2) | Payer details |
InvoicePostalAddressDetails | object | Address details |
2.4.1.5.1 InvoiceOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Payer’s name |
2.4.1.5.2 InvoicePostalAddressDetails-object
Element | Type | Definition |
InvoiceStreetName | array(0...2) | Street addresses |
InvoiceTownName | string (utf-8) | City / Post office |
InvoicePostCodeIdentifier | string (utf-8) | Postal code |
2.4.1.5.2.1. InvoiceStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.4.1.6 InvoiceCommunicationDetails-object
Element | Type | Definition |
InvoicePhoneNumberIdentifier | string (utf-8) | Phone number |
InvoiceGsmNumberIdentifier | string (utf-8) | Mobile number |
InvoiceEmailaddressIdentifier | string (utf-8) | E-mail address |
2.4.1.7 OrderPartyDetails-object
Element | Type | Definition | Mandatory |
OrderPartyIdentifierId | int(11) | Internal identifier | |
OrderPartyIdentifierField | sstring (utf-8) | Internal identifier field | |
OrderOrganisationName | array(1-2) | Orderer name object | PUT (1-2) |
OrderPostalAddressDetails | object | Address details | PUT |
2.4.1.7.1 OrderOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Name of orderer |
2.4.1.7.2 OrderPostalAddressDetails-object
Element | Type | Definition | Mandatory |
OrderStreetName | array(0...2) | Street addresses | PUT (1-2) |
OrderTownName | string (utf-8) | City / Post office | PUT |
OrderPostCodeIdentifier | string (utf-8) | Postal code | PUT |
2.4.1.7.2.1. OrderStreetName-table
Element | Type | Definition | Mandatory |
StreetName | string (utf-8) | Street address | PUT |
2.4.1.8 OrderCommunicationDetails-object
Element | Type | Definition |
OrderPhoneNumberIdentifier | string (utf-8) | Phone number |
OrderGsmNumberIdentifier | string (utf-8) | Mobile number |
OrderEmailaddressIdentifier | string (utf-8) | E-mail address |
2.4.1.9 DeliveryPartyDetails-object
Element | Type | Definition |
DeliveryPartyIdentifierId | int(11) | Internal identifier |
DeliveryPartyIdentifierField | string (utf-8) | Internal identifier field |
DeliveryOrganisationName | array(1-2) | Delivery party name object |
DeliveryPostalAddressDetails | object | Address details |
2.4.1.9.1 DeliveryOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | Name of delivery party |
2.4.1.9.2 DeliveryPostalAddressDetails-object
Element | Type | Definition |
DeliveryStreetName | array(0...2) | Street addresses |
DeliveryTownName | string (utf-8) | City / Post office |
DeliveryPostCodeIdentifier | string (utf-8) | Postal code |
2.4.1.9.2.1. DeliveryStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.4.1.10 DeliveryCommunicationDetails-object
Element | Type | Definition |
DeliveryPhoneNumberIdentifier | string (utf-8) | Phone |
DeliveryGsmNumberIdentifier | string (utf-8) | Mobile number |
DeliveryEmailaddressIdentifier | string (utf-8) | E-mail address |
2.4.1.11 CustomerPartyDetails-object
Element | Type | Definition |
CustomerPartyIdentifierId | int(11) | Internal identifier |
CustomerPartyIdentifierField | string (utf-8) | Internal identifier field |
CustomerOrganisationName | array(1-2) | “Customer” party name object |
CustomerPostalAddressDetails | object | Address details |
2.4.1.11.1 CustomerOrganisationName-table
Element | Type | Definition |
OrganisationName | string (utf-8) | “Customer” party name |
2.4.1.11.2 CustomerPostalAddressDetails-object
Element | Type | Definition |
CustomerStreetName | array(0...2) | Street addresses |
CustomerTownName | string (utf-8) | City / Post office |
CustomerPostCodeIdentifier | string (utf-8) | Postal code |
2.4.1.11.2.1 CustomerStreetName-table
Element | Type | Definition |
StreetName | string (utf-8) | Street address |
2.4.1.12 CustomerCommunicationDetails-object
Element | Type | Definition |
CustomerPhoneNumberIdentifier | string (utf-8) | Phone |
CustomerGsmNumberIdentifier | string (utf-8) | Mobile number |
CustomerEmailaddressIdentifier | string (utf-8) | E-mail address |
2.4.1.13 DeliveryDetails-object
Element | Type | Definition |
DeliveryMethodText | string (utf-8) | Delivery method |
DeliveryTermsText | string (utf-8) | Delivery terms |
DeliveryNoteIdentifier | string (utf-8) | Consignment note / Bill of landing |
DeliveryInstruction | string (utf-8) | Delivery instructions |
TransportInstruction | string (utf-8) | Transport instructions |
2.4.1.14 InvoiceDetails-object
Element | Type | Definition |
WorkReferenceIdentifier | string (utf-8) | Service work reference |
CustomerReferenceIdentifier | string (utf-8) | Customer reference |
ProjectReferenceIdentifier | string (utf-8) | Project number |
BillingInstruction | string (utf-8) | Instructions: Billing instructions |
PaymentTermsDetails | object | Payment terms |
2.4.1.14.1 PaymentTermsDetails-object
Element | Type | Definition |
PaymentTermsFreeText | string (utf-8) | Payment terms |
2.4.1.15 WorkDetails-object
Element | Type | Definition | Mandatory |
ProductDetails | object | Product details | PUT |
WarrantyDetails | object | Warranty details | |
CostEstimateDetails | object | Cost estimate details | |
SwapDetails | object | Replacement unit details | |
DateDetails | object | Date details | |
WorkingTimeDetails | object | Working time details | |
ProductFreeText | array(0...n) | Additional information: Service work product extra fields on the “Repair work” > “Additional info” -tab | |
ProductAttachments | object | Product attahcments | |
Descriptions | object | Work description | PUT |
2.4.1.15.1 ProductDetails-object
Element | Type | Definition | Mandatory |
ProductNumber | string (utf-8) | Product number | PUT |
Product | string (utf-8) | Product | |
ProductGroup | string (utf-8) | Product group | |
CompletionYear | string (utf-8) | Year of completion | |
SerialNumberIdentifiers | object | Serial numbers | PUT (1–3) |
SystemProductNumber | string (utf-8) | System product number | |
SystemSerialNumber | string (utf-8) | System serial number |
2.4.1.15.1.1 SerialNumberIdentifiers-object
Element | Type | Definition |
SerialNumberIdentifier1 | string (utf-8) | Serial number 1 |
SerialNumberIdentifier2 | string (utf-8) | Serial number 2 |
SerialNumberIdentifier3 | string (utf-8) | Serial number 3 |
2.4.1.15.2 WarrantyDetails-object
Element | Type | Definition |
WarrantorWarranty | object | Warrantor warranty |
AgreementNumber | string (utf-8) | Agreement number |
ServiceWarranty | object | Service warranty |
AcquisitionDate | string (utf-8) | Date of acquisition |
AcquisitionPlace | string (utf-8) | Place of acquisition |
2.4.1.15.2.1 WarrantorWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
WarrantyDate | string (utf-8) | Warranty date |
2.4.1.15.2.2 ServiceWarranty-object
Element | Type | Definition |
Warranty | string (utf-8) | Warranty |
WarrantyDate | string (utf-8) | Warranty date |
2.4.1.15.3 CostEstimateDetails-object
Element | Type | Definition |
EstimateOfCost | string(1), (utf-8) | Cost estimate: Y/N |
CostLimit | string (utf-8) | Cost limit |
CostAuthorized | string(1), (utf-8) | Accepted Y/N |
CostAuthorizedName | string (utf-8) | The approver / acceptor |
CostAuthorizedDate | date(YYYY-mm-dd) | Accepted date |
CostAuthorizedTime | time(HH-ii-ss) | Accepted time |
2.4.1.15.4 SwapDetails-object
Element | Type | Definition |
RemovedProductNumber | string (utf-8) | Product number: Deleted item information |
RemovedProduct | string (utf-8) | Product: Deleted item information |
RemovedCompletionYear | string (utf-8) | Year of completion: Deleted item information |
DOA | string(1) (utf-8) | DOA: Deleted item information (Y / N) |
RemovedSerialNumberIdentifiers | object | Serial numbers: Deleted item information (Y / N) |
2.4.1.15.4.1 RemovedSerialNumberIdentifiers-object
Element | Type | Definition |
SerialNumberIdentifier1 | string (utf-8) | Serial number 1: Deleted item information |
SerialNumberIdentifier2 | string (utf-8) | Serial number 2: Deleted item information |
SerialNumberIdentifier3 | string (utf-8) | Serial number 3: Deleted item information |
2.4.1.15.5 DateDetails-object
Element | Type | Definition |
ReceiveDate | date(YYYY-mm-dd) | Received date |
ReceiveTime | time(HH-ii-ss) | Received time |
AgreedStartDate | date(YYYY-mm-dd) | Agreed start date |
AgreedStartTime | time(HH-ii-ss) | Agreed start time |
AgreedWorkDate | date(YYYY-mm-dd) | Agreed repair date |
AgreedWorkTime | time(HH-ii-ss) | Agreed repair time |
StartDate | date(YYYY-mm-dd) | Repair start date |
StartTime | time(HH-ii-ss) | Repair start time |
EndDate | date(YYYY-mm-dd) | Repair end date |
EndTime | time(HH-ii-ss) | Repair end time |
AgreedDeliveryDate | date(YYYY-mm-dd) | Agreed delivery date |
AgreedDeliveryTime | time(HH-ii-ss) | Agreed delivery time |
DeliveryDate | date(YYYY-mm-dd) | Delivery date |
DeliveryTime | time(HH-ii-ss) | Delivery time |
NotifyDate | date(YYYY-mm-dd) | Notification date |
NotifyTime | time(HH-ii-ss) | Notification time |
CustomerVisitDate | date(YYYY-mm-dd) | Customer visit date |
CustomerVisitTime | time(HH-ii-ss) | Customer visit time |
SlaRealization | string (utf-8) | Actual SLA: 'Not set' / 'Y' / 'N' |
SlaRealization | The allowed values for this element are defined in the Definiton column. If any value other than the allowed ones is provided, the interface will set the value of the SlaRealization element to 'Not set' and return the following warning: "SlaRealization value unknown. SlaRealization should be ('Not set'/'Y'/'N'). SlaRealization set as 'Not set'" |
2.4.1.15.6 WorkingTimeDetails-object
Element | Type | Definition |
WorkTime | time(HH-ii) | Working time used |
TravelTime | time(HH-ii) | Travel time spent |
OverTime | string(1) (utf-8) | Overtime |
OverTimeHours | time(HH-ii) | Overtime spent |
AfterBusinessTime | string(1) (utf-8) | Outside working hours |
AfterBusinessTimeHours | time(HH-ii) | Time spent outside working hours |
2.4.1.15.7 ProductFreeText-table
Element | Type | Definition |
ProductFreeTextTitle | string (utf-8) | Title: Custom free text field title |
ProductFreeText | string (utf-8) | Value: Service work product free fields on the “Repair work” > “Additional info” -tab |
2.4.1.15.8 ProductAttachments-object
Element | Type | Definition |
Attachment(1-5) | object | Attachments |
2.4.1.15.8.1 Attachment(1-5)-object
Element | Type | Definition |
FileName | string (utf-8) | File name |
File | text (base64) | File content |
2.4.1.15.9 Descriptions-object
Element | Type | Definition | Mandatory |
WorkDescription | string (utf-8) | Vian kuvaus | Pakollinen PUT |
Equipments | string (utf-8) | Lisätarvikkeet | |
ShortWorkReport | string (utf-8) | Lyhyt korjauskuvaus | |
WorkReport | string (utf-8) | Huoltotyön seloste | |
WorkReportToCustomer | string (utf-8) | Huoltotyön seloste asiakkaalle |
2.4.1.16 WorkFreeText-object
Element | Type | Definition | Mandatory |
WorkFreeText[x] | object | WorkFreeText0, WorkFreeText1, WorkFreeText2, WorkFreeText3 | YES |
2.4.1.16.1 WorkFreeText(x)-object
Element | Type | Definition |
FreeTextTitle | string (utf-8) | Title |
FreeText | string (utf-8) | Value |
2.4.1.17 Attachments-table
Element | Type | Definition |
FileName | string (utf-8) | File name |
File | text (base64) | File content |
2.4.1.18 WorkMaterialRows-table
Element | Type | Definition | Mandatory |
WorkMaterialRow(x) | object | For example: WorkMaterialRow1, WorkMaterialRow2, WorkMaterialRow3 etc. | YES |
2.4.1.18.1 WorkMaterialRows-table
Element | Type | Definition | Mandatory |
RowIdentifier | int(11) | Row identifier | POST |
RowOrder | int(11) | Row order number | |
ArticleIdentifier | string (utf-8) | Product number | PUT |
ArticleName | string (utf-8) | Product | |
SerialNumberIdentifier | string (utf-8) | Serial number | |
OrderedQuantity | double(####) | Ordered quantity | PUT/POST |
QuantityUnitCode | string (utf-8) | Unit | PUT |
UnitPriceAmount | double(####,#####) | Vat free unit price | PUT/POST |
UnitPurchaseAPriceAmount | double(####,#####) | Unit A-purchase price | |
UnitPurchaseBPriceAmount | double(####,#####) | Unit B-purchase price | |
RowProjectReferenceIdentifier | string (utf-8) | Project number | |
RowAccountDimensionText | string (utf-8) | Cost center | |
RowDiscountPercent | double(####) | Discount percentage | |
RowVatRatePercent | double(####) | VAT percentage | PUT |
RowVatAmount | double(####,#####) | VAT amount | |
RowVatExcludedAmount | double(####,#####) | VAT free amount | |
RowAmount | double(####,#####) | Total amount including tax | |
AmountCurrencyIdentifier | string(3) (utf-8) | Currency | |
RowNormalProposedAccountIdentifier | string (utf-8) | Accounting account |
2.5 Response content (PUT/POST)
Element | Type | Definition |
ResponseStatus | int (0/1) | 0 = Error 1 = OK, Operation completed successfully |
ResponseMessage | string (utf-8) | Additional description of events, errors, etc. |
WorkIdentifier | object | Object containing added / updated works |
2.5.1 WorkIdentifier-object
Element | Type | Definition |
Work(x) | object | Added / updated works Work1, Work2, Work3, etc. |
2.5.1.1 Work(x)-object
Element | Type | Definition |
Status | int (0/1) | 0 = Error 1 = OK, Operation completed successfully |
Message | string (utf-8) | Additional description of events, errors, etc. |
WorkIdentifierId | int(11) | Work identifier |
WorkNumberIdentifier | string (utf-8) | Work number |
PublicServiceCode | string (utf-8) | Encrypted job number |
3 Code samples
The code samples presented in the documents are examples of how the interface can be used. The available code package can be used as it is or further developed to suit individual needs. Implementation of the codes requires PHP knowledge from the www-service provider. NetBaron Solutions OY is not responsible for any direct or indirect damage and costs related to the sample codes when a third party does the implementation and further development.
Please note: The software code created and implemented must not cause server overload situations. We reserve the right to bill the creator of the software code or the end customer for system failure in the server environment. If necessary, please get the software code checked by sending it to our support tuki@netbaron.fi and adding the mention: "WS-Service interface software code to product development for review and possible feedback".
3.1 PHP (GET)
<?php
function getresp($responsex, $pref=""){
$responserows = "";
foreach($responsex as $k => $r){
if(is_array($r)){
$responserows .= $pref."$k => Array(<br>".getresp($r,$pref." ").$pref."),<br>";
} else if(is_object($r)){
$responserows .= $pref."$k => Object(<br>".getresp($r,$pref." ").$pref."),<br>";
} else $responserows .= $pref."$k => $r<br>";
}
return $responserows;
}
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/service",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$Request = new stdClass();
$Request->GetServiceCompanyPartyDetails = true;
$Request->GetWorkerPartyDetails = true;
$Request->GetInvoicePartyDetails = true;
$Request->GetOrderPartyDetails = true;
$Request->GetDeliveryPartyDetails = true;
$Request->GetCustomerPartyDetails = true;
$Request->GetDeliveryDetails = true;
$Request->GetWorkDetails = true;
$Request->GetProductDetails = true;
$Request->GetWarrantyDetails = true;
$Request->GetCostEstimateDetails = true;
$Request->GetSwapDetails = true;
$Request->GetWorkingTimeDetails = true;
$Request->GetProductFreeText = true;
$Request->GetProductAttachments = true;
$Request->GetDescriptions = true;
$Request->GetWorkAdditionalData = true;
$Request->GetInvoiceDetails = true;
$Request->GetWorkFreeText = true;
$Request->GetWorkMaterialRows = true;
$Request->GetWorkReadOutRows = true;
$Request->GetWorkAttachments = false;
$Request->GetDateDetails = true;
$Request->WorkProductNumberIdentifiers = new stdClass();
$Ord = "Work1";
$Request->WorkProductNumberIdentifiers->$Ord = (object) array("WorkProductNumberIdentifier"=>"058186", "SerialNumberIdentifier1"=>"123456789", "SerialNumberIdentifier2"=>"234567890", "SerialNumberIdentifier3"=>"345678901");
$response = $client->get( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );
if(is_object($response)){
$responserows = getresp($response);
} else $responserows = $response;
$response = "<b>RESPONSE</b><pre>".utf8_decode($responserows)."</b></pre>";
}
catch(SoapFault $fault){
$response .= "<b>SOAP Fault:</b><pre>faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring}</pre>";
}
echo $response;
?>
3.2 PHP (PUT/POST)
<?php
function getresp($responsex, $pref=""){
$responserows = "";
foreach($responsex as $k => $r){
if(is_array($r)){
$responserows .= $pref."$k => Array(<br>".getresp($r,$pref." ").$pref."),<br>";
} else if(is_object($r)){
$responserows .= $pref."$k => Object(<br>".getresp($r,$pref." ").$pref."),<br>";
} else $responserows .= $pref."$k => $r<br>";
}
return $responserows;
}
$ns = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
$token = new stdClass;
// Client-puolen encodingista riippuen, mahdollisesti utf_encode tarvitaan
$token->Username = new SOAPVar("username", XSD_STRING, null, null, null, $ns);
$token->Password = new SOAPVar("password", XSD_STRING, null, null, null, $ns);
$wsec = new stdClass;
$wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $ns);
$soapHeaders[] = new SOAPHeader($ns, 'Security', $wsec->UsernameToken, true);
/**
* Client
*/
$client = new SoapClient(null, array(
"location" => "https://<serverurl>/ws/service",
"uri" => "urn:NBWS",
'style' => SOAP_RPC,
'use' => SOAP_LITERAL,
"soap_version" => SOAP_1_2,
"compression" => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5,
"trace" => 1)
);
/**
* Set headers
*/
$client->__setSoapHeaders( $soapHeaders );
/**
* Call PHP soap
*/
try{
$Request = new stdClass();
$Request = new stdClass();
$Request->GenerateWorkNumber = true;
$Works = new stdClass();
$Works->Work1 = new stdClass();
$Works->Work1->OrderPartyDetails = new stdClass();
$Works->Work1->OrderPartyDetails->OrderOrganisationName = new stdClass();
$Works->Work1->OrderPartyDetails->OrderOrganisationName->Org0 = new stdClass();
$Works->Work1->OrderPartyDetails->OrderOrganisationName->Org0->OrganisationName = utf8_encode("Pullin Kala Oy");
$Works->Work1->OrderPartyDetails->OrderOrganisationName->Org1 = new stdClass();
$Works->Work1->OrderPartyDetails->OrderOrganisationName->Org1->OrganisationName = utf8_encode("");
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails = new stdClass();
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderStreetName = new stdClass();
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderStreetName->St0 = new stdClass();
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderStreetName->St0->StreetName = utf8_encode("Haapatie 7");
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderStreetName->St1 = new stdClass();
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderStreetName->St1->StreetName = utf8_encode("");
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderTownName = utf8_encode("Helsinki");
$Works->Work1->OrderPartyDetails->OrderPostalAddressDetails->OrderPostCodeIdentifier = utf8_encode("00100");
$Works->Work1->OrderContactPersonName = utf8_encode("Hanna Paananen");
$Works->Work1->OrderCommunicationDetails = new stdClass();
$Works->Work1->OrderCommunicationDetails->OrderPhoneNumberIdentifier = utf8_encode("");
$Works->Work1->OrderCommunicationDetails->OrderGsmNumberIdentifier = utf8_encode("");
$Works->Work1->OrderCommunicationDetails->OrderEmailaddressIdentifier = utf8_encode("");
$Works->Work1->WorkDetails = new stdClass();
$Works->Work1->WorkDetails->ProductDetails = new stdClass();
$Works->Work1->WorkDetails->ProductDetails->ProductNumber = utf8_encode("058186");
$Works->Work1->WorkDetails->ProductDetails->SerialNumberIdentifiers = new stdClass();
$Works->Work1->WorkDetails->ProductDetails->SerialNumberIdentifiers->SerialNumberIdentifier1 = "123456789";
$Works->Work1->WorkDetails->WarrantyDetails = new stdClass();
$Works->Work1->WorkDetails->WarrantyDetails->WarrantorWarranty = new stdClass();
$Works->Work1->WorkDetails->WarrantyDetails->WarrantorWarranty->Warranty = utf8_encode("Takuu");
$Works->Work1->WorkDetails->WarrantyDetails->WarrantorWarranty->WarrantyDate = utf8_encode("1.1.2013");
$Works->Work1->WorkDetails->WarrantyDetails->AcquisitionDate = utf8_encode("2010-12-21");
$Works->Work1->WorkDetails->WarrantyDetails->AcquisitionPlace = utf8_encode("Myymälä");
$Works->Work1->WorkDetails->Descriptions = new stdClass();
$Works->Work1->WorkDetails->Descriptions->WorkDescription = utf8_encode("Rikki, ei näy");
$Request->Works = $Works;
$response = $client->put( new SoapVar($Request, SOAP_ENC_OBJECT,"","","Request") );
if(is_object($response)){
$responserows = getresp($response);
} else $responserows = $response;
$response = "<b>RESPONSE</b><pre>".utf8_decode($responserows)."</b></pre>";
}
catch(SoapFault $fault){
$response .= "<b>SOAP Fault:</b><pre>faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring}</pre>";
}
echo $response;
?>
3.3 XML-content
3.3.1 Request (GET)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security env:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<env:Body>
<ns1:get>
<Request>
<GetServiceCompanyPartyDetails>true</GetServiceCompanyPartyDetails>
<GetWorkerPartyDetails>true</GetWorkerPartyDetails>
<GetInvoicePartyDetails>true</GetInvoicePartyDetails>
<GetOrderPartyDetails>true</GetOrderPartyDetails>
<GetDeliveryPartyDetails>true</GetDeliveryPartyDetails>
<GetCustomerPartyDetails>true</GetCustomerPartyDetails>
<GetDeliveryDetails>true</GetDeliveryDetails>
<GetWorkDetails>true</GetWorkDetails>
<GetProductDetails>true</GetProductDetails>
<GetWarrantyDetails>true</GetWarrantyDetails>
<GetCostEstimateDetails>true</GetCostEstimateDetails>
<GetSwapDetails>true</GetSwapDetails>
<GetWorkingTimeDetails>true</GetWorkingTimeDetails>
<GetProductFreeText>true</GetProductFreeText>
<GetProductAttachments>true</GetProductAttachments>
<GetDescriptions>true</GetDescriptions>
<GetWorkAdditionalData>true</GetWorkAdditionalData>
<GetInvoiceDetails>true</GetInvoiceDetails>
<GetWorkFreeText>true</GetWorkFreeText>
<GetWorkMaterialRows>true</GetWorkMaterialRows>
<GetWorkReadOutRows>true</GetWorkReadOutRows>
<GetWorkAttachments>false</GetWorkAttachments>
<GetDateDetails>true</GetDateDetails>
<WorkProductNumberIdentifiers>
<Work1>
<WorkProductNumberIdentifier>058186</WorkProductNumberIdentifier>
<SerialNumberIdentifier1>123456789</SerialNumberIdentifier1>
<SerialNumberIdentifier2>234567890</SerialNumberIdentifier2>
<SerialNumberIdentifier3>345678901</SerialNumberIdentifier3>
</Work1>
</WorkProductNumberIdentifiers>
</Request>
</ns1:get>
</env:Body>
</env:Envelope>
3.3.2 Response (GET)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:getResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<NumberOfWorks xsi:type="xsd:int">1</NumberOfWorks>
<Works enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<WorkIdentifierId xsi:type="xsd:string">4648</WorkIdentifierId>
<WorkNumberIdentifier xsi:type="xsd:string">2008122</WorkNumberIdentifier>
<WorkType xsi:type="xsd:string">Swap</WorkType>
<WorkStatusDetails xsi:type="enc:Struct">
<WorkStatusCode xsi:type="xsd:string">In processing</WorkStatusCode>
<WorkExtraStatusCode xsi:type="xsd:string">Cust Delay</WorkExtraStatusCode>
</WorkStatusDetails>
<ServiceCompanyPartyDetails xsi:type="enc:Struct">
<ServiceCompanyPartyIdentifierId xsi:type="xsd:string">1</ServiceCompanyPartyIdentifierId>
<ServiceCompanyPartyIdentifierField xsi:type="xsd:string">CompanyId</ServiceCompanyPartyIdentifierField>
<ServiceCompanyOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<OrganisationName xsi:type="xsd:string">Netbaron Solutions Oy</OrganisationName>
</item>
</ServiceCompanyOrganisationName>
<ServiceCompanyPostalAddressDetails xsi:type="enc:Struct">
<ServiceCompanyStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<StreetName xsi:type="xsd:string">Kumitehtaankatu 5</StreetName>
</item>
</ServiceCompanyStreetName>
<ServiceCompanyTownName xsi:type="xsd:string">Kerava</ServiceCompanyTownName>
<ServiceCompanyPostCodeIdentifier xsi:type="xsd:string">04260</ServiceCompanyPostCodeIdentifier>
</ServiceCompanyPostalAddressDetails>
</ServiceCompanyPartyDetails>
<WorkerPartyDetails xsi:type="enc:Struct">
<WorkerName xsi:type="xsd:string">Huolto Huoltaja</WorkerName>
</WorkerPartyDetails>
<WorkerCommunicationDetails xsi:type="enc:Struct">
<WorkerPhoneNumberIdentifier xsi:type="xsd:boolean">false</WorkerPhoneNumberIdentifier>
<WorkerGsmNumberIdentifier xsi:type="xsd:boolean">false</WorkerGsmNumberIdentifier>
<WorkerEmailaddressIdentifier xsi:type="xsd:string">huolto.huoltaja@huoltoyritys.fi</WorkerEmailaddressIdentifier>
</WorkerCommunicationDetails>
<InvoicePartyDetails xsi:type="enc:Struct">
<InvoicePartyIdentifierId xsi:type="xsd:string">497</InvoicePartyIdentifierId>
<InvoicePartyIdentifierField xsi:type="xsd:string">CustomerId</InvoicePartyIdentifierField>
<InvoiceOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<OrganisationName xsi:type="xsd:string">Pullin Kala Oy</OrganisationName>
</item>
</InvoiceOrganisationName>
<InvoicePostalAddressDetails xsi:type="enc:Struct">
<InvoiceStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<StreetName xsi:type="xsd:string">Haapatie 7</StreetName>
</item>
</InvoiceStreetName>
<InvoiceTownName xsi:type="xsd:string">Helsinki</InvoiceTownName>
<InvoicePostCodeIdentifier xsi:type="xsd:string">00100</InvoicePostCodeIdentifier>
</InvoicePostalAddressDetails>
</InvoicePartyDetails>
<InvoiceContactPersonName xsi:type="xsd:string">Hanna Paananen</InvoiceContactPersonName>
<OrderPartyDetails xsi:type="enc:Struct">
<OrderPartyIdentifierId xsi:type="xsd:string">497</OrderPartyIdentifierId>
<OrderPartyIdentifierField xsi:type="xsd:string">CustomerId</OrderPartyIdentifierField>
<OrderOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<OrganisationName xsi:type="xsd:string">Pullin Kala Oy</OrganisationName>
</item>
</OrderOrganisationName>
<OrderPostalAddressDetails xsi:type="enc:Struct">
<OrderStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<StreetName xsi:type="xsd:string">Haapatie 7</StreetName>
</item>
</OrderStreetName>
<OrderTownName xsi:type="xsd:string">Helsinki</OrderTownName>
<OrderPostCodeIdentifier xsi:type="xsd:string">00100</OrderPostCodeIdentifier>
</OrderPostalAddressDetails>
</OrderPartyDetails>
<OrderContactPersonName xsi:type="xsd:string">Hanna Paananen</OrderContactPersonName>
<DeliveryPartyDetails xsi:type="enc:Struct">
<DeliveryPartyIdentifierId xsi:type="xsd:string">497</DeliveryPartyIdentifierId>
<DeliveryPartyIdentifierField xsi:type="xsd:string">CustomerId</DeliveryPartyIdentifierField>
<DeliveryOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<OrganisationName xsi:type="xsd:string">Pullin Kala Oy</OrganisationName>
</item>
</DeliveryOrganisationName>
<DeliveryPostalAddressDetails xsi:type="enc:Struct">
<DeliveryStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<StreetName xsi:type="xsd:string">Haapatie 7</StreetName>
</item>
</DeliveryStreetName>
<DeliveryTownName xsi:type="xsd:string">Helsinki</DeliveryTownName>
<DeliveryPostCodeIdentifier xsi:type="xsd:string">00100</DeliveryPostCodeIdentifier>
</DeliveryPostalAddressDetails>
</DeliveryPartyDetails>
<DeliveryContactPersonName xsi:type="xsd:string">Hanna Paananen</DeliveryContactPersonName>
<CustomerPartyDetails xsi:type="enc:Struct">
<CustomerPartyIdentifierId xsi:type="xsd:string">671</CustomerPartyIdentifierId>
<CustomerPartyIdentifierField xsi:type="xsd:string">CustomerId</CustomerPartyIdentifierField>
<CustomerOrganisationName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<OrganisationName xsi:type="xsd:string">Testiasiakas</OrganisationName>
</item>
</CustomerOrganisationName>
<CustomerPostalAddressDetails xsi:type="enc:Struct">
<CustomerStreetName enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<StreetName xsi:type="xsd:string">Taapertajantie 1234</StreetName>
</item>
</CustomerStreetName>
<CustomerTownName xsi:type="xsd:string">Tohmajärvi</CustomerTownName>
<CustomerPostCodeIdentifier xsi:type="xsd:string">00765</CustomerPostCodeIdentifier>
</CustomerPostalAddressDetails>
</CustomerPartyDetails>
<CustomerContactPersonName xsi:type="xsd:string">Antti</CustomerContactPersonName>
<DeliveryDetails xsi:type="enc:Struct">
<DeliveryMethodText xsi:type="xsd:string">Keltainen kuljetus 16</DeliveryMethodText>
<DeliveryTermsText xsi:type="xsd:string">Vapaasti varastossa</DeliveryTermsText>
<DeliveryNoteIdentifier xsi:type="xsd:string">k-kirja</DeliveryNoteIdentifier>
<DeliveryInstruction xsi:type="xsd:string">t-ohjw</DeliveryInstruction>
<TransportInstruction xsi:type="xsd:string">k-ohje</TransportInstruction>
</DeliveryDetails>
<InvoiceDetails xsi:type="enc:Struct">
<WorkReferenceIdentifier xsi:type="xsd:string">meidän viite</WorkReferenceIdentifier>
<CustomerReferenceIdentifier xsi:type="xsd:string">heidän viite</CustomerReferenceIdentifier>
<TotalVatExcludedAmount xsi:type="xsd:string">280,49</TotalVatExcludedAmount>
<TotalVatAmount xsi:type="xsd:string">64,51</TotalVatAmount>
<TotalVatIncludedAmount xsi:type="xsd:string">345,00</TotalVatIncludedAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<BillingInstruction xsi:type="xsd:string">l-ohje</BillingInstruction>
<PaymentTermsDetails xsi:type="enc:Struct">
<PaymentTermsFreeText xsi:type="xsd:string">14 pv netto</PaymentTermsFreeText>
</PaymentTermsDetails>
</InvoiceDetails>
<WorkDetails xsi:type="enc:Struct">
<ProductDetails xsi:type="enc:Struct">
<ProductNumber xsi:type="xsd:string">058186</ProductNumber>
<Product xsi:type="xsd:string">Huoltotuote</Product>
<ProductGroup xsi:type="xsd:string">Muut tuotteet</ProductGroup>
<CompletionYear xsi:type="xsd:string">
</CompletionYear>
<SerialNumberIdentifiers xsi:type="enc:Struct">
<SerialNumberIdentifier1 xsi:type="xsd:string">123456789</SerialNumberIdentifier1>
<SerialNumberIdentifier2 xsi:type="xsd:string">234567890</SerialNumberIdentifier2>
<SerialNumberIdentifier3 xsi:type="xsd:string">345678901</SerialNumberIdentifier3>
</SerialNumberIdentifiers>
<SystemProductNumber xsi:type="xsd:string">014</SystemProductNumber>
<SystemSerialNumber xsi:type="xsd:string">111</SystemSerialNumber>
</ProductDetails>
<WarrantyDetails xsi:type="enc:Struct">
<Warrantor xsi:type="xsd:string">Matti Meikäläinen</Warrantor>
<WarrantorWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">Swap warranty</Warranty>
<WarrantyDate xsi:type="xsd:string">1.1.2010aä</WarrantyDate>
</WarrantorWarranty>
<AgreementNumber xsi:type="xsd:string">1234586</AgreementNumber>
<ServiceWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">No warranty</Warranty>
<WarrantyDate xsi:type="xsd:string">öääö</WarrantyDate>
</ServiceWarranty>
<AcquisitionDate xsi:type="xsd:string">2010-12-15</AcquisitionDate>
<AcquisitionPlace xsi:type="xsd:string">fdas</AcquisitionPlace>
</WarrantyDetails>
<CostEstimateDetails xsi:type="enc:Struct">
<EstimateOfCost xsi:type="xsd:string">Y</EstimateOfCost>
<CostLimit xsi:type="xsd:string">199</CostLimit>
<CostAuthorized xsi:type="xsd:string">Y</CostAuthorized>
<CostAuthorizedName xsi:type="xsd:string">Hyväksyjä</CostAuthorizedName>
<CostAuthorizedDate xsi:type="xsd:string">2010-12-15</CostAuthorizedDate>
<CostAuthorizedTime xsi:type="xsd:string">09:17:00</CostAuthorizedTime>
</CostEstimateDetails>
<SwapDetails xsi:type="enc:Struct">
<RemovedProductNumber xsi:type="xsd:string">058186</RemovedProductNumber>
<RemovedProduct xsi:type="xsd:string">KUUSIORUUVI M10*65 DIN931</RemovedProduct>
<RemovedCompletionYear xsi:type="xsd:string">fasdf</RemovedCompletionYear>
<DOA xsi:type="xsd:string">Y</DOA>
<RemovedSerialNumberIdentifiers xsi:type="enc:Struct">
<SerialNumberIdentifier1 xsi:type="xsd:string">123456789</SerialNumberIdentifier1>
<SerialNumberIdentifier2 xsi:type="xsd:string">234567890</SerialNumberIdentifier2>
<SerialNumberIdentifier3 xsi:type="xsd:string">345678901</SerialNumberIdentifier3>
</RemovedSerialNumberIdentifiers>
</SwapDetails>
<DateDetails xsi:type="enc:Struct">
<ReceiveDate xsi:type="xsd:string">2010-11-04</ReceiveDate>
<ReceiveTime xsi:type="xsd:string">11:57:00</ReceiveTime>
<StartDate xsi:type="xsd:string">2010-11-04</StartDate>
<StartTime xsi:type="xsd:string">11:58:00</StartTime>
<EndDate xsi:type="xsd:string">2010-11-04</EndDate>
<EndTime xsi:type="xsd:string">11:58:00</EndTime>
<AgreedDeliveryDate xsi:type="xsd:string">2010-11-04</AgreedDeliveryDate>
<AgreedDeliveryTime xsi:type="xsd:string">11:58:00</AgreedDeliveryTime>
</DateDetails>
<WorkingTimeDetails xsi:type="enc:Struct">
<WorkTime xsi:type="xsd:string">01:00</WorkTime>
<TravelTime xsi:type="xsd:string">02:00</TravelTime>
<OverTime xsi:type="xsd:string">Y</OverTime>
<OverTimeHours xsi:type="xsd:string">03:00</OverTimeHours>
<AfterBusinessTime xsi:type="xsd:string">Y</AfterBusinessTime>
<AfterBusinessTimeHours xsi:type="xsd:string">04:00</AfterBusinessTimeHours>
</WorkingTimeDetails>
<ProductAttachments xsi:type="enc:Struct"/>
<Descriptions xsi:type="enc:Struct">
<WorkDescription xsi:type="xsd:string">vian kuvaus</WorkDescription>
<Equipments xsi:type="xsd:string">lisät</Equipments>
<ShortWorkReport xsi:type="xsd:string">lyhyt</ShortWorkReport>
<WorkReport xsi:type="xsd:string">seloste</WorkReport>
<WorkReportToCustomer xsi:type="xsd:string">asiakkaalle</WorkReportToCustomer>
</Descriptions>
</WorkDetails>
<WorkFreeText enc:itemType="enc:Struct" enc:arraySize="4" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<FreeTextTitle xsi:type="xsd:string">Test field</FreeTextTitle>
<FreeText xsi:type="xsd:string">14.12.2010</FreeText>
</item>
<item xsi:type="enc:Struct">
<FreeTextTitle xsi:type="xsd:string">Extra field2</FreeTextTitle>
<FreeText xsi:type="xsd:string">v2</FreeText>
</item>
<item xsi:type="enc:Struct">
<FreeTextTitle xsi:type="xsd:string">Extra field3</FreeTextTitle>
<FreeText xsi:type="xsd:string">v3</FreeText>
</item>
<item xsi:type="enc:Struct">
<FreeTextTitle xsi:type="xsd:string">Extra field4</FreeTextTitle>
<FreeText xsi:type="xsd:string">v4</FreeText>
</item>
</WorkFreeText>
<WorkAdditionalData xsi:type="enc:Struct">
<Announcement xsi:type="xsd:string">Aukioloaikamme
Ma-Pe 8.00 - 16.00
La-Su Suljettuddd</Announcement>
<AdditionalData xsi:type="xsd:string">
</AdditionalData>
</WorkAdditionalData>
<WorkMaterialRows enc:itemType="enc:Struct" enc:arraySize="2" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<WorkMaterialRow xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">3326</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">0078913</ArticleIdentifier>
<ArticleGroupIdentifier xsi:type="xsd:string">2115</ArticleGroupIdentifier>
<ArticleName xsi:type="xsd:string">NOKIA 6610I BLACK 0059579 RM-37</ArticleName>
<WarrantyDetails xsi:type="enc:Struct">
<WarrantorWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">No warranty</Warranty>
</WarrantorWarranty>
<ServiceWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">No warranty</Warranty>
</ServiceWarranty>
</WarrantyDetails>
<SerialNumberIdentifier xsi:type="xsd:string">fdsfasd</SerialNumberIdentifier>
<OrderedQuantity xsi:type="xsd:string">1</OrderedQuantity>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">kpl</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">280,48780</UnitPriceAmount>
<UnitPurchaseAPriceAmount xsi:type="xsd:string">100.000</UnitPurchaseAPriceAmount>
<UnitPurchaseBPriceAmount xsi:type="xsd:string">122.000</UnitPurchaseBPriceAmount>
<RowVatRatePercent xsi:type="xsd:string">23</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">64,51</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">280,49</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">345,00</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<RowNormalProposedAccountIdentifier xsi:type="xsd:string">3000</RowNormalProposedAccountIdentifier>
</WorkMaterialRow>
</item>
<item xsi:type="enc:Struct">
<WorkMaterialRow xsi:type="enc:Struct">
<RowIdentifier xsi:type="xsd:string">3327</RowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">06131-gbfb00</ArticleIdentifier>
<ArticleGroupIdentifier xsi:type="xsd:string">Honda orginal</ArticleGroupIdentifier>
<ArticleName xsi:type="xsd:string">CR-80 79cc vm.96-99 Mäntäsarja</ArticleName>
<WarrantyDetails xsi:type="enc:Struct">
<WarrantorWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">Swap warranty</Warranty>
</WarrantorWarranty>
<ServiceWarranty xsi:type="enc:Struct">
<Warranty xsi:type="xsd:string">Warranty</Warranty>
</ServiceWarranty>
</WarrantyDetails>
<ArticleInfoUrlText xsi:type="xsd:string">http://jeejee.fi</ArticleInfoUrlText>
<EanCode xsi:type="xsd:string">4902030181000</EanCode>
<OrderedQuantity xsi:type="xsd:string">1</OrderedQuantity>
<DeliveredQuantity xsi:type="xsd:string">1</DeliveredQuantity>
<QuantityUnitCode xsi:type="xsd:string">kpl</QuantityUnitCode>
<UnitPriceAmount xsi:type="xsd:string">71,30976</UnitPriceAmount>
<UnitPurchaseAPriceAmount xsi:type="xsd:string">44.335</UnitPurchaseAPriceAmount>
<UnitPurchaseBPriceAmount xsi:type="xsd:string">44.336</UnitPurchaseBPriceAmount>
<RowVatRatePercent xsi:type="xsd:string">23</RowVatRatePercent>
<RowVatAmount xsi:type="xsd:string">16,40</RowVatAmount>
<RowVatExcludedAmount xsi:type="xsd:string">71,31</RowVatExcludedAmount>
<RowAmount xsi:type="xsd:string">87,71</RowAmount>
<AmountCurrencyIdentifier xsi:type="xsd:string">EUR</AmountCurrencyIdentifier>
<RowNormalProposedAccountIdentifier xsi:type="xsd:string">3000</RowNormalProposedAccountIdentifier>
</WorkMaterialRow>
</item>
</WorkMaterialRows>
<WorkReadOutRows enc:itemType="enc:Struct" enc:arraySize="1" xsi:type="enc:Array">
<item xsi:type="enc:Struct">
<WorkReadOutRow xsi:type="enc:Struct">
<ReadOutRowIdentifier xsi:type="xsd:string">546</ReadOutRowIdentifier>
<ArticleIdentifier xsi:type="xsd:string">fdas</ArticleIdentifier>
<ArticleName xsi:type="xsd:string">fdas</ArticleName>
<SerialNumberIdentifier xsi:type="xsd:string">fads</SerialNumberIdentifier>
<ReadingStartDate xsi:type="xsd:string">2010-12-16</ReadingStartDate>
<ReadingStart xsi:type="xsd:string">1111</ReadingStart>
<ReadingEndDate xsi:type="xsd:string">2010-12-16</ReadingEndDate>
<ReadingEnd xsi:type="xsd:string">222</ReadingEnd>
<ReadingSum xsi:type="xsd:string">-889</ReadingSum>
<QuantityUnitCode xsi:type="xsd:string">kpl</QuantityUnitCode>
</WorkReadOutRow>
</item>
</WorkReadOutRows>
</item>
</Works>
</Response>
</ns1:getResponse>
</env:Body>
</env:Envelope>
3.3.3 Viesti (PUT/POST)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<env:Header>
<wsse:Security env:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<ns1:put>
<Request>
<GenerateWorkNumber>true</GenerateWorkNumber>
<Works>
<Work1>
<OrderPartyDetails>
<OrderOrganisationName>
<Org0>
<OrganisationName>Pullin Kala Oy</OrganisationName>
</Org0>
<Org1>
<OrganisationName>
</OrganisationName>
</Org1>
</OrderOrganisationName>
<OrderPostalAddressDetails>
<OrderStreetName>
<St0>
<StreetName>Haapatie 7</StreetName>
</St0>
<St1>
<StreetName>
</StreetName>
</St1>
</OrderStreetName>
<OrderTownName>Helsinki</OrderTownName>
<OrderPostCodeIdentifier>00100</OrderPostCodeIdentifier>
</OrderPostalAddressDetails>
</OrderPartyDetails>
<OrderContactPersonName>Hanna Paananen</OrderContactPersonName>
<OrderCommunicationDetails>
<OrderPhoneNumberIdentifier>
</OrderPhoneNumberIdentifier>
<OrderGsmNumberIdentifier>
</OrderGsmNumberIdentifier>
<OrderEmailaddressIdentifier>
</OrderEmailaddressIdentifier>
</OrderCommunicationDetails>
<WorkDetails>
<ProductDetails>
<ProductNumber>058186</ProductNumber>
<SerialNumberIdentifiers>
<SerialNumberIdentifier1>123456789</SerialNumberIdentifier1>
</SerialNumberIdentifiers>
</ProductDetails>
<WarrantyDetails>
<WarrantorWarranty>
<Warranty>Takuu</Warranty>
<WarrantyDate>1.1.2013</WarrantyDate>
</WarrantorWarranty>
<AcquisitionDate>2010-12-21</AcquisitionDate>
<AcquisitionPlace>Myymälä</AcquisitionPlace>
</WarrantyDetails>
<Descriptions>
<WorkDescription>Rikki, ei näy</WorkDescription>
</Descriptions>
</WorkDetails>
</Work1>
</Works>
</Request>
</ns1:put>
</env:Body>
</env:Envelope>
3.3.4 Vastaus (PUT/POST)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NBWS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
<ns1:postResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<rpc:result>Response</rpc:result>
<Response xsi:type="enc:Struct">
<ResponseStatus xsi:type="xsd:int">1</ResponseStatus>
<ResponseMessage xsi:type="xsd:string">
</ResponseMessage>
<WorkIdentifier xsi:type="enc:Struct">
<Work1 xsi:type="enc:Struct">
<Status xsi:type="xsd:int">1</Status>
<Message xsi:type="xsd:string">
</Message>
<WorkIdentifierId xsi:type="xsd:int">4762</WorkIdentifierId>
<WorkNumberIdentifier xsi:type="xsd:string">2008140</WorkNumberIdentifier>
</Work1>
</WorkIdentifier>
</Response>
</ns1:postResponse>
</env:Body>
</env:Envelope>