เดี่ยวบ่ายนี้มีคำตอบ
Showing posts with label web service. Show all posts
Showing posts with label web service. Show all posts
Wednesday, June 2, 2010
How to attachments file in web service
นั่นสิครับ เจอคำถามนี้เข้าไปผมก็เลยงง เลยครับ ปกติการส่ง data between more than 2 services like message (Soap message) แต่ถ้าผมต้องการจะแนบไฟล์ไปกับ response message หละ ทำยังไงดี - -"
Web Service Standards Listings
พอมีเวลาว่างสักหน่อยก็เป็นว่าต้องหาอะไร มาอ่านอยู่เรื่องเลย จริง ๆ เรื่องที่อ่านเนี่ย ก็พอมีความรู้อยู่บ้างนิดหน่อยแต่ก็กลัวว่าจะลืม เลยมารื้อฟื้นความรู้ซะหน่อยเกี่ยวกับ webservice เกี่ยวกับเรื่อง Web Service Standards และก็ไปเจอใน wiki บอกได้คำเดียวว่าเยอะมาก ๆ สงสัยอ่านจนตาลายแน่ ๆ ^^
Web Service Standards Listings
These sites contain documents and links about the different Web Services standards identified on this page.
- IBM developerWork: Standard and Web Service
- innoQ's WS-Standard Overview (DiagramPDF)
- MSDN .NET Developer Centre: Web Service Specification Index Page
- OASIS Standards and Other Approved Work
- Open Grid Forum Final Document
- XML CoverPage
- W3C's Web Services Activity
XML Specification
- XML (eXtensible Markup Language)
- XML Namespaces
- XML Schema
- XPath
- XQuery
- XML Information Set
- XInclude
- XML Pointer
Messaging Specification
- SOAP (formerly known as Simple Object Access Protocol)
- SOAP-over-UDP[1]
- SOAP Message Transmission Optimization Mechanism
- WS-Notification
- WS-Addressing
- WS-Transfer
- WS-Eventing
- WS-Enumeration
- WS-MakeConnection
Metadata Exchange Specification
- WS-Policy
- WS-PolicyAssertions
- WS-PolicyAttachment
- WS-Discovery
- WS-MetadataExchange
- Universal Description, Discovery, and Integration (UDDI)
- WSDL 2.0 Core
- WSDL 2.0 SOAP Binding
- Web Services Semantics (WSDL-S)
- WS-Resource Framework (WSRF)
Security Specification
- WS-Security
- XML Signature
- XML Encryption
- XML Key Management (XKMS)
- WS-SecureConversation
- WS-SecurityPolicy
- WS-Trust
- WS-Federation
- WS-Federation Active Requestor Profile
- WS-Federation Passive Requestor Profile
- Web Services Security Kerberos Binding
- Web Single Sign-On Interoperability Profile
- Web Single Sign-On Metadata Exchange Protocol
- Security Assertion Markup Language (SAML)
- XACML
Privacy
Reliable Messaging Specifications
Resource Specifications
- Web Services Resource Framework
- WS-BaseFaults
- WS-ServiceGroup
- WS-ResourceProperties
- WS-ResourceLifetime
- WS-Transfer
- Resource Representation SOAP Header Block
Web Services Interoperability (WS-I) Specification
These specifications provide additional information to improve interoperability between vendor implementations.
Business Process Specifications
Transaction Specifications
Management Specifications
Presentation Oriented Specification
Draft Specifications
- WS-Provisioning Describes the APIs and Schemas necessary to facilitate interoperability between provisioning systems in a consistent manner using Web services
Other
Friday, January 15, 2010
PHP5 Consume .Net Web service
error_reporting(E_ALL);
$ValidateEmail = new SoapClient("http://www.webservicex.net/ValidateEmail.asmx?wsdl");
$email = array("Email" => "me@somewhere.com");
try {
$response = $ValidateEmail->IsValidEmail($email);
if ($response->IsValidEmailResult) {
echo $email["Email"] . " is a valid email address";
} else {
echo $email["Email"] . " is not a valid email address";
}
} catch (SoapFault $fault) {
//LOG IF YOU WANT
echo $email["Email"] . " is not a valid email address";
}
echo '
' . var_dump($response) . '';
?>
Thursday, January 14, 2010
WSDL vs. non-WSDL Modes
พอดีวันนี้ จำเป็นที่จะต้อง consume .net web service using php5 with soap extesion แล้วไปเจอเขากับ article ที่ : http://wso2.org/library/1060
เขาจะพูดเรื่องของ php soap extension แล้วผ่านไปมาเจอกับ web service module 2 แบบ คือ
1. WSDL model
2. non-WSDL model
เลยลองอ่านเพิ่มเติม ประกฏว่าได้เรื่องดังนี้ครับ (ไม่แน่ใจว่าผมเข้าใจถูกหรือเปล่าว)
สำหรับการ implement web service จะมีอยู่ 2 models ด้วยกันคือ
1. Contract First model
2. Code First model
สอง model นี้มันต่างกันยังไง
อันแรก Contact first model จะมี WSDL เป็นตัวที่ใช้อธิบาย detail ของ web service ซึ่งภายในก็จะอธิบายถึงการ implement and consume
อันหลัง Code first model. In the code first model, the code implementing the service is written first. Then in most cases a contract, in other words a WSDL, is generated out of the code. Then the client can use that WSDL, at the time of consuming the service, to take note of the interface of the service. However, the PHP 5's SOAP extension does not have provisions for generating a WSDL out of the code. To cater for this situation, the non-WSDL mode of the SoapServer and SoapClient can be used.
เขาจะพูดเรื่องของ php soap extension แล้วผ่านไปมาเจอกับ web service module 2 แบบ คือ
1. WSDL model
2. non-WSDL model
เลยลองอ่านเพิ่มเติม ประกฏว่าได้เรื่องดังนี้ครับ (ไม่แน่ใจว่าผมเข้าใจถูกหรือเปล่าว)
สำหรับการ implement web service จะมีอยู่ 2 models ด้วยกันคือ
1. Contract First model
2. Code First model
สอง model นี้มันต่างกันยังไง
อันแรก Contact first model จะมี WSDL เป็นตัวที่ใช้อธิบาย detail ของ web service ซึ่งภายในก็จะอธิบายถึงการ implement and consume
อันหลัง Code first model. In the code first model, the code implementing the service is written first. Then in most cases a contract, in other words a WSDL, is generated out of the code. Then the client can use that WSDL, at the time of consuming the service, to take note of the interface of the service. However, the PHP 5's SOAP extension does not have provisions for generating a WSDL out of the code. To cater for this situation, the non-WSDL mode of the SoapServer and SoapClient can be used.
ง่าย ๆ คือ php extension นี้จะไม่มีการ generate wsdl ให้ เหมือนใน nusoap
Subscribe to:
Posts (Atom)